Java Annotation Processors to Help the Development Process

Java Annotation Processors to Help the Development Process

Since the introduction of annotations in Java 5, numerous frameworks have made good use of them in a runtime context, but less has been done to take advantage of their compile-time capabilities. Writing annotation processors is straightforward and can turn what would be runtime problems into compile-time warnings or errors.

This presentation discusses ways annotation processors can improve the development process and shows a complete example of a processor that provides compile-time verification of certain JPA invariants. Attendees will discover that writing annotation processors is not a black art but something that is safe to “try at home.”