Chapter 13. Annotations

Annotations are tags that you insert into your source code for processing by tools. The tags can be processed at the source level, or the compiler can include them in class files.

Annotations do not change the way in which your programs are compiled. (The JDK 5.0 compiler uses a couple of annotations to generate or suppress warnings, but it generates the same class files with or without the annotations. These annotations are simple and somewhat atypical since third parties can't add new annotations to the compiler.)

In order to benefit from annotations, ...

Get Core Java™ 2 Volume II - Advanced Features, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.