Uses of Interface
java.lang.annotation.Annotation
Package | Description |
---|---|
java.beans |
Contains classes related to developing beans -- components based on
the JavaBeans™ architecture.
|
java.lang |
Provides classes that are fundamental to the design of the Java
programming language.
|
java.lang.annotation |
Provides library support for the Java programming language
annotation facility.
|
java.lang.reflect |
Provides classes and interfaces for obtaining reflective information about
classes and objects.
|
javax.annotation.processing |
Facilities for declaring annotation processors and for
allowing annotation processors to communicate with an annotation processing
tool environment.
|
javax.lang.model |
Classes and hierarchies of packages used to model the Java
programming language.
|
javax.lang.model.element |
Interfaces used to model elements of the Java programming language.
|
javax.management |
Provides the core classes for the Java Management Extensions.
|
javax.swing |
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
|
-
Uses of Annotation in java.beans
Classes in java.beans that implement Annotation Modifier and Type Class Description interface
BeanProperty
An annotation used to specify some property-related information for the automatically generatedBeanInfo
classes.interface
ConstructorProperties
An annotation on a constructor that shows how the parameters of that constructor correspond to the constructed object's getter methods.interface
JavaBean
An annotation used to specify some class-related information for the automatically generatedBeanInfo
classes.interface
Transient
Indicates that an attribute called "transient" should be declared with the givenvalue
when theIntrospector
constructs aPropertyDescriptor
orEventSetDescriptor
classes associated with the annotated code element. -
Uses of Annotation in java.lang
Classes in java.lang that implement Annotation Modifier and Type Class Description interface
Deprecated
A program element annotated@Deprecated
is one that programmers are discouraged from using.interface
FunctionalInterface
An informative annotation type used to indicate that an interface type declaration is intended to be a functional interface as defined by the Java Language Specification.interface
Override
Indicates that a method declaration is intended to override a method declaration in a supertype.interface
SafeVarargs
A programmer assertion that the body of the annotated method or constructor does not perform potentially unsafe operations on its varargs parameter.interface
SuppressWarnings
Indicates that the named compiler warnings should be suppressed in the annotated element (and in all program elements contained in the annotated element).Methods in java.lang with type parameters of type Annotation Modifier and Type Method Description <A extends Annotation>
AClass. getAnnotation(Class<A> annotationClass)
<T extends Annotation>
TModule. getAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null.<A extends Annotation>
APackage. getAnnotation(Class<A> annotationClass)
<A extends Annotation>
A[]Class. getAnnotationsByType(Class<A> annotationClass)
<A extends Annotation>
A[]Package. getAnnotationsByType(Class<A> annotationClass)
<A extends Annotation>
AClass. getDeclaredAnnotation(Class<A> annotationClass)
<A extends Annotation>
APackage. getDeclaredAnnotation(Class<A> annotationClass)
<A extends Annotation>
A[]Class. getDeclaredAnnotationsByType(Class<A> annotationClass)
<A extends Annotation>
A[]Package. getDeclaredAnnotationsByType(Class<A> annotationClass)
Methods in java.lang that return Annotation Modifier and Type Method Description Annotation[]
Class. getAnnotations()
Annotation[]
Module. getAnnotations()
Returns annotations that are present on this element.Annotation[]
Package. getAnnotations()
<A extends Annotation>
A[]Class. getAnnotationsByType(Class<A> annotationClass)
<A extends Annotation>
A[]Package. getAnnotationsByType(Class<A> annotationClass)
Annotation[]
Class. getDeclaredAnnotations()
Annotation[]
Module. getDeclaredAnnotations()
Returns annotations that are directly present on this element.Annotation[]
Package. getDeclaredAnnotations()
<A extends Annotation>
A[]Class. getDeclaredAnnotationsByType(Class<A> annotationClass)
<A extends Annotation>
A[]Package. getDeclaredAnnotationsByType(Class<A> annotationClass)
Method parameters in java.lang with type arguments of type Annotation Modifier and Type Method Description boolean
Class. isAnnotationPresent(Class<? extends Annotation> annotationClass)
Returns true if an annotation for the specified type is present on this element, else false.boolean
Package. isAnnotationPresent(Class<? extends Annotation> annotationClass)
Returns true if an annotation for the specified type is present on this element, else false. -
Uses of Annotation in java.lang.annotation
Classes in java.lang.annotation that implement Annotation Modifier and Type Class Description interface
Documented
If the annotation@Documented
is present on the declaration of an annotation type A, then any@A
annotation on an element is considered part of the element's public contract.interface
Inherited
Indicates that an annotation type is automatically inherited.interface
Native
Indicates that a field defining a constant value may be referenced from native code.interface
Repeatable
The annotation typejava.lang.annotation.Repeatable
is used to indicate that the annotation type whose declaration it (meta-)annotates is repeatable.interface
Retention
Indicates how long annotations with the annotated type are to be retained.interface
Target
Indicates the contexts in which an annotation type is applicable.Methods in java.lang.annotation that return types with arguments of type Annotation Modifier and Type Method Description Class<? extends Annotation>
Annotation. annotationType()
Returns the annotation type of this annotation.Class<? extends Annotation>
IncompleteAnnotationException. annotationType()
Returns the Class object for the annotation type with the missing element.Class<? extends Annotation>
value()
Indicates the containing annotation type for the repeatable annotation type.Constructor parameters in java.lang.annotation with type arguments of type Annotation Constructor Description IncompleteAnnotationException(Class<? extends Annotation> annotationType, String elementName)
Constructs an IncompleteAnnotationException to indicate that the named element was missing from the specified annotation type. -
Uses of Annotation in java.lang.reflect
Methods in java.lang.reflect with type parameters of type Annotation Modifier and Type Method Description <T extends Annotation>
TAccessibleObject. getAnnotation(Class<T> annotationClass)
<T extends Annotation>
TAnnotatedElement. getAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TConstructor. getAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TExecutable. getAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TField. getAnnotation(Class<T> annotationClass)
<T extends Annotation>
TMethod. getAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TParameter. getAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
T[]AccessibleObject. getAnnotationsByType(Class<T> annotationClass)
default <T extends Annotation>
T[]AnnotatedElement. getAnnotationsByType(Class<T> annotationClass)
Returns annotations that are associated with this element.<T extends Annotation>
T[]Executable. getAnnotationsByType(Class<T> annotationClass)
Returns annotations that are associated with this element.<T extends Annotation>
T[]Field. getAnnotationsByType(Class<T> annotationClass)
Returns annotations that are associated with this element.<T extends Annotation>
T[]Parameter. getAnnotationsByType(Class<T> annotationClass)
Returns annotations that are associated with this element.<T extends Annotation>
TAccessibleObject. getDeclaredAnnotation(Class<T> annotationClass)
default <T extends Annotation>
TAnnotatedElement. getDeclaredAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is directly present, else null.<T extends Annotation>
TParameter. getDeclaredAnnotation(Class<T> annotationClass)
<T extends Annotation>
T[]AccessibleObject. getDeclaredAnnotationsByType(Class<T> annotationClass)
default <T extends Annotation>
T[]AnnotatedElement. getDeclaredAnnotationsByType(Class<T> annotationClass)
Returns this element's annotation(s) for the specified type if such annotations are either directly present or indirectly present.<T extends Annotation>
T[]Parameter. getDeclaredAnnotationsByType(Class<T> annotationClass)
Methods in java.lang.reflect that return Annotation Modifier and Type Method Description Annotation[]
AccessibleObject. getAnnotations()
Annotation[]
AnnotatedElement. getAnnotations()
Returns annotations that are present on this element.<T extends Annotation>
T[]AccessibleObject. getAnnotationsByType(Class<T> annotationClass)
default <T extends Annotation>
T[]AnnotatedElement. getAnnotationsByType(Class<T> annotationClass)
Returns annotations that are associated with this element.<T extends Annotation>
T[]Executable. getAnnotationsByType(Class<T> annotationClass)
Returns annotations that are associated with this element.<T extends Annotation>
T[]Field. getAnnotationsByType(Class<T> annotationClass)
Returns annotations that are associated with this element.<T extends Annotation>
T[]Parameter. getAnnotationsByType(Class<T> annotationClass)
Returns annotations that are associated with this element.Annotation[]
AccessibleObject. getDeclaredAnnotations()
Annotation[]
AnnotatedElement. getDeclaredAnnotations()
Returns annotations that are directly present on this element.Annotation[]
Constructor. getDeclaredAnnotations()
Returns annotations that are directly present on this element.Annotation[]
Method. getDeclaredAnnotations()
Returns annotations that are directly present on this element.<T extends Annotation>
T[]AccessibleObject. getDeclaredAnnotationsByType(Class<T> annotationClass)
default <T extends Annotation>
T[]AnnotatedElement. getDeclaredAnnotationsByType(Class<T> annotationClass)
Returns this element's annotation(s) for the specified type if such annotations are either directly present or indirectly present.<T extends Annotation>
T[]Parameter. getDeclaredAnnotationsByType(Class<T> annotationClass)
Annotation[][]
Constructor. getParameterAnnotations()
Returns an array of arrays ofAnnotation
s that represent the annotations on the formal parameters, in declaration order, of theExecutable
represented by this object.abstract Annotation[][]
Executable. getParameterAnnotations()
Returns an array of arrays ofAnnotation
s that represent the annotations on the formal parameters, in declaration order, of theExecutable
represented by this object.Annotation[][]
Method. getParameterAnnotations()
Returns an array of arrays ofAnnotation
s that represent the annotations on the formal parameters, in declaration order, of theExecutable
represented by this object.Method parameters in java.lang.reflect with type arguments of type Annotation Modifier and Type Method Description boolean
AccessibleObject. isAnnotationPresent(Class<? extends Annotation> annotationClass)
Returns true if an annotation for the specified type is present on this element, else false.default boolean
AnnotatedElement. isAnnotationPresent(Class<? extends Annotation> annotationClass)
Returns true if an annotation for the specified type is present on this element, else false. -
Uses of Annotation in javax.annotation.processing
Classes in javax.annotation.processing that implement Annotation Modifier and Type Class Description interface
Generated
The Generated annotation is used to mark source code that has been generated.interface
SupportedAnnotationTypes
An annotation used to indicate what annotation types an annotation processor supports.interface
SupportedOptions
An annotation used to indicate what options an annotation processor supports.interface
SupportedSourceVersion
An annotation used to indicate the latest source version an annotation processor supports.Method parameters in javax.annotation.processing with type arguments of type Annotation Modifier and Type Method Description Set<? extends Element>
RoundEnvironment. getElementsAnnotatedWith(Class<? extends Annotation> a)
Returns the elements annotated with the given annotation type.default Set<? extends Element>
RoundEnvironment. getElementsAnnotatedWithAny(Set<Class<? extends Annotation>> annotations)
Returns the elements annotated with one or more of the given annotation types. -
Uses of Annotation in javax.lang.model
Methods in javax.lang.model with type parameters of type Annotation Modifier and Type Method Description <A extends Annotation>
AAnnotatedConstruct. getAnnotation(Class<A> annotationType)
Returns this construct's annotation of the specified type if such an annotation is present, elsenull
.<A extends Annotation>
A[]AnnotatedConstruct. getAnnotationsByType(Class<A> annotationType)
Returns annotations that are associated with this construct.Methods in javax.lang.model that return Annotation Modifier and Type Method Description <A extends Annotation>
A[]AnnotatedConstruct. getAnnotationsByType(Class<A> annotationType)
Returns annotations that are associated with this construct. -
Uses of Annotation in javax.lang.model.element
Methods in javax.lang.model.element with type parameters of type Annotation Modifier and Type Method Description <A extends Annotation>
AElement. getAnnotation(Class<A> annotationType)
Returns this construct's annotation of the specified type if such an annotation is present, elsenull
. -
Uses of Annotation in javax.management
Classes in javax.management that implement Annotation Modifier and Type Class Description interface
ConstructorParameters
An annotation on a constructor that shows how the parameters of that constructor correspond to the constructed object's getter methods.interface
DescriptorKey
Meta-annotation that describes how an annotation element relates to a field in aDescriptor
.interface
MXBean
Annotation to mark an interface explicitly as being an MXBean interface, or as not being an MXBean interface. -
Uses of Annotation in javax.swing
Classes in javax.swing that implement Annotation Modifier and Type Class Description interface
SwingContainer
An annotation used to specify some swing-related information for the automatically generatedBeanInfo
classes.