A recent java.net article describes APT, the JDK 5 Annotation Processing Tool, and JSR-269, the Pluggable Annotation Processing API, scheduled for inclusion in Mustang.
In the article, Validate Java EE Annotations with Annotation Processors, author Jason Zhicheng Li illustrates the use of APT, a little-known command line tool for processing annotations that's included in JDK 5. He suggests that one potential use of APT is to validate semantic constraints on annotations at build time, such as that both @Stateless and @Stateful annotations may not be present for a session bean. He also gives a glimpse into the JSR-269 Annotation Processor, which is expected to be part of the Mustang release, and will provide a standard way to do annotation processing.
Beyond verifying semantic constraints on annotations, annotation processing allows you to use annotations as input driving code generation at build time. Annotations have now been around for a while. How have you put them to use?