Take the 2-minute tour ×  Is it possible to use a bytecode
manipulation library like ASM at compile time?  Specifically,
I'd like to use Java's annotation processing API to implement
boilerplate-heavy methods on annotated classes. Implementing an
annotation processor is straightforward enough, but it seems
like the .class files don't yet exist when the Processor is run.
Is there another way?  share|improve this question  3 Answers 3
It should be possible since the following project is doing it:
Project Lombok   Java 8 will bring a new mechanism that allows
you to write plug-ins for the Java compiler (javac). A compiler
plug-in lets you add new phases to javac without making changes
to its code base. New behavior can be encapsulated in a plug-in
and distributed for other people to use. For example, javac
plug-ins could be used to do the following:  • Add extra
compile-time checks  • Add code transformations  • Perform
customized analysis of source code  share|improve this answer
You might be interested in Ja