Reputation: 56944
Is annotation processing still an active part of Java 6+, or is it something that has been deprecated/discouraged/obsolesced. If obsolesced, why (why is it no longer needed/useful)? And if it's still extremely useful and "active" (a new Java project developing against the Java 6+ JDK would still benefit from it), please confirm/correct my understanding of how annotation processors are used:
@MyAnnotation
@MyAnnotation
MyAnnotationProcessor
(how?)@MyAnnotation
Upvotes: 7
Views: 4394
Reputation: 901
AbstractProcessor
. You specify your MyAnnotationProcessor
class using the ServiceLoader
pattern - this makes it discoverable to the compiler. The Processor
Javadoc contains some information on creating this class.I hope that addresses your understanding questions.
Upvotes: 16