Java compile with processors in one command
Is there some way to do compilation of both code and processors in the same javac
run? For example when the source tree contains:
a.java // with annotations
b.java 开发者_如何学Go // processor
c.java // referrencing files to be generated
Can I somehow compile it all with one javac
invocation?
No, that's not possible. Annotation processing is done in a separate round before compilation, at which point b.java would already have to be compiled. You need to separate compile runs. One for the processor, one for the rest.
精彩评论