November 2004
Intermediate to advanced
1024 pages
27h 50m
English
JDK 5.0 defines seven annotation interfaces. Three of them are regular annotations that you can use to annotate items in your source code. The other four are meta-annotations that describe the behavior of annotation interfaces. Table 13-1 shows these annotations. We discuss them in detail in the following two sections.
| Annotation Interface | Applicable To | Purpose |
|---|---|---|
| Deprecated | All | Marks item as deprecated |
| SuppressWarnings | All but packages and annotations | Suppresses warnings of the given type |
| Override | Methods | Checks that this method overrides a superclass method |
| Target | Annotations | Specifies the items to which this annotation can be applied |
| Retention | Annotations | Specifies how long this annotation is retained |
Read now
Unlock full access