I'm working on a Java program (Dagger) that uses the Java annotation processing API to generate code. When our program encounters an annotation in Foo.java
, it generates Foo$$InjectAdapter.java
. We use the Filer
API to attach the originating Element
that triggered the generated code.
The Filer docs say that this is intended to aid incremental builds:
"This information may be used in an incremental environment to determine the need to rerun processors or remove generated files. Non-incremental environments may ignore the originating element information."
Does anyone know of an incremental environment that use this information? Does javac
or the Eclipse compiler use this information?