Tag Archives: Annotation processor

Build your own Annotation processor using Java6 – Part 1

After previous post we all understood basic Annotation’s terms, how to custom it, how to retrieve it at Runtime by reflection. To day, i’m going more deeply, such a writing Annotation processor, and integrate it with eclipse to reuse in a sample Android project.

Java SE5 provides a command-line utility for annotation processing, call Annotation processing tool or apt. It contains a set of reflective APIs and supporting infrastructure to process program annotations.

Since Java SE7, the apt tool and tis associated API have been deprecated, and are planned to be removed in next JDK release. Instead of it, use javac tool and APIs contained in the packages javax.annotation.processing and javax.lang.model to process annotations.

Continue reading