Java Annotation Processor: Difference between revisions
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
The processing API can only be used to generate new files, not change the existing ones. Lombok is an [[Lombok#Not_a_Typical_Use|exception]]. | The processing API can only be used to generate new files, not change the existing ones. Lombok is an [[Lombok#Not_a_Typical_Use|exception]]. | ||
=TODO= | |||
META-INF/services/javax.annotation.processing.Processor | |||
http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/javac.html#processing |
Revision as of 07:12, 1 November 2018
External
Internal
Overview
The Pluggable Annotation Processing API is specified by JSR 269 and can be used to develop custom annotation processors. Annotation processing is actively used in many Java libraries, for instance to generate metaclasses in JPA or to augment classes with boilerplate code in Lombok library.
The processing API can only be used to generate new files, not change the existing ones. Lombok is an exception.
TODO
META-INF/services/javax.annotation.processing.Processor
http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/javac.html#processing