|
This post originated from an RSS feed registered with Java Buzz
by justin cater.
|
Original Post: Java Annotation Processors
Feed Title: Java Code Geeks
Feed URL: http://feeds.feedburner.com/JavaCodeGeeks
Feed Description: Java 2 Java Developers Resource Center
|
Latest Java Buzz Posts
Latest Java Buzz Posts by justin cater
Latest Posts From Java Code Geeks
|
|
After kick-starting the Advanced Java course by discussing how to How to create and destroy objects, how to use methods common to all objects, how to design Classes and Interfaces, how and when to use generics, how to use enums and annotations, how to write methods efficiently, various programming guidelines, how and when to use Exceptions, some concurrency best practices, the Built-in Serialization techniques, How to use Reflection effectively, how to leverage scripting and dynamic languages support in Java, and how to use the Java Compiler API, we are now going a step further.
In this lesson we are going to demystify the magic of annotation processing, which is often used to inspect, modify or generate source code, driven only by annotations. Essentially, annotation processors are some kind of plugins of the Java compiler. Annotation processors used wisely could significantly simplify the life of Java developers so that is why they are often bundled with many popular libraries and frameworks.
Annotations processors are typically used to inspect the codebase against the presence of particular annotations and, depending on use case, to: generate a set of source or resource files, mutate (modify) the existing source code or analyze the exiting source code and generate diagnostic messages.
Get started here
Read: Java Annotation Processors