Name

Documented

Synopsis

A meta-annotation of this type indicates that the annotated type should be documented by Javadoc and similar documentation tools. If an annotation type is an @Documented annotation, then the presence of an annotation of that type is part of the public API of the annotated program element. java.lang.Deprecated is an @Documented annotation type, for example, and so are each of the meta-annotation types in this package.

It is recommended that any annotation type that is @Documented should also have runtime @Retention so that the presence of the annotation can be queried via reflection.

java.lang.annotation.Documented

Figure 10-76. java.lang.annotation.Documented

public @interface Documented {
}

Get Java in a Nutshell, 5th 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.