public interface Annotated
Represents a Java program element that can be annotated.
AnnotatedElement| Modifier and Type | Method and Description | 
|---|---|
| <T extends Annotation> | getAnnotation(Class<T> annotationType)
 Get program element annotation of a certain annotation type. | 
| Set<Annotation> | getAnnotations()
 Get all annotations of the program element. | 
| Type | getBaseType()
 Get the type of the annotated program element. | 
| Set<Type> | getTypeClosure()
 Get all types to which the base type should be considered assignable. | 
| boolean | isAnnotationPresent(Class<? extends Annotation> annotationType)
 Determine if the program element has an annotation of a certain annotation type. | 
Type getBaseType()
Get the type of the annotated program element.
Set<Type> getTypeClosure()
Get all types to which the base type should be considered assignable.
<T extends Annotation> T getAnnotation(Class<T> annotationType)
Get program element annotation of a certain annotation type.
T - the type of the annotationannotationType - the class of the annotation typeSet<Annotation> getAnnotations()
Get all annotations of the program element.
boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
Determine if the program element has an annotation of a certain annotation type.
annotationType - the annotation type to check forCopyright © 1996-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.