Java Programing laungage

java.lang Projects

java.lang Project

java.lang Examples

java.lang Examples

Package java.lang.annotation

This package provides library support for the Java programming language annotation facility.

Previous Home Next

java.lang.annotation Package

AnnotationDescription
DocumentedIndicates that annotations with a type are to be documented by javadoc and similar tools by default. This type should be used to annotate the declarations of types whose annotations affect the use of annotated elements by their clients.
InheritedIndicates that an annotation type is automatically inherited. If an Inherited meta-annotation is present on an annotation type declaration, and the user queries the annotation type on a class declaration, and the class declaration has no annotation for this type, then the class's superclass will automatically be queried for the annotation type.
RetentionIndicates how long annotations with the annotated type are to be retained. If no Retention annotation is present on an annotation type declaration, the retention policy defaults to RetentionPolicy.CLASS.
TargetIndicates the kinds of program element to which an annotation type is applicable. If a Target meta-annotation is not present on an annotation type declaration, the declared type may be used on any program element.
InterfaceDescription
Annotation The common interface extended by all annotation types.
EnumDescription
ElementTypeA program element type. The constants of this enumerated type provide a simple classification of the declared elements in a Java program.
RetentionPolicyAnnotation retention policy. The constants of this enumerated type describe the various policies for retaining annotations
ExceptionDescription
AnnotationTypeMismatchExceptionThrown to indicate that a program has attempted to access an element of an annotation whose type has changed after the annotation was compiled (or serialized).
IncompleteAnnotationExceptionThrown to indicate that a program has attempted to access an element of an annotation type that was added to the annotation type definition after the annotation was compiled (or serialized).
ErrorDescription
AnnotationFormatErrorThrown when the annotation parser attempts to read an annotation from a class file and determines that the annotation is malformed.
Previous Home Next