Represents a construct that can be annotated. A construct is either an element or a type. Annotations on an element are on a declaration, whereas annotations on a type are on a specific use of a type name. The terms directly present, present, indirectly present, and associated are used throughout this interface to describe precisely which annotations are returned by the methods defined herein.
In the definitions below, an annotation A has an annotation type AT. If AT is a repeatable annotation type, the type of the containing annotation is ATC.
Annotation A is directly present on a construct C if either:
Typically, if exactly one annotation of type AT appears in the source code of representation of C, then A is explicitly declared as applying to C. If there are multiple annotations of type AT present on C, then if AT is repeatable annotation type, an annotation of type ATC is implicitly declared on C.
RuntimeVisibleParameterAnnotationsattributes of a class file.
An annotation A is present on a construct C if either:
valuemethod of the directly present annotation of type ATC.
@jls 9.6 Annotation Types
@jls 18.104.22.168 @Inherited