| This Chapter | |
| - | Chapter 18: Annotations |
| - | An Overview of Annotations |
| - | Standard Annotations |
| - | Standard Meta-Annotations |
| - | Custom Annotation Types |
| - | Summary |
| - | Questions |
A new feature in Java 5, annotations are notes in Java programs to instruct the Java compiler to do something. You can annotate any program elements, including Java packages, classes, constructors, fields, methods, parameters, and local variables. Java annotations are defined in JSR 175 (http://www.jcp.org/en/jsr/detail?id=175). Java provides three standard annotations and four standard meta-annotations. In addition, you can create custom annotations.
This chapter starts with an overview of annotations, and then teaches you how to use the standard annotations. It concludes with a discussion of custom annotations.