开发者

Java compile with processors in one command

开发者 https://www.devze.com 2023-03-06 17:13 出处:网络
Is there some way to do compilation of both code and processors in the same javac run? For example when the source tree contains:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消