public interface JavaHasAnnotations extends JavaElement
Note: @Retention values for annotations on local variables that are not formal parameters are implicitly SOURCE.
EMPTY_ARRAY| Modifier and Type | Method and Description | 
|---|---|
JavaAnnotation | 
getAnnotation(JavaType annotationType)
Retrieves the annotation declared on this element that matches
 the input annotation type. 
 | 
java.util.Collection<JavaAnnotation> | 
getAnnotations()
Retrieves all the annotations declared on this element. 
 | 
JavaAnnotation | 
getDeclaredAnnotation(JavaType annotationType)  | 
java.util.Collection<JavaAnnotation> | 
getDeclaredAnnotations()
Retrieves all the annotations declared on this element. 
 | 
default boolean | 
hasAnnotation(java.lang.String annotationName)
Determine if this element has declared a particular annotation. 
 | 
default boolean | 
hasDeclaredAnnotation(java.lang.String annotationName)
Determine if this element has declared a particular annotation. 
 | 
getElementKind, getFile, getModifiers, getOwner, getSourceElement, isDeprecated, isFinal, isHidden, isMandated, isSourceElement, isSynthetic, printCompiledInfojava.util.Collection<JavaAnnotation> getDeclaredAnnotations()
java.util.Collection<JavaAnnotation> getAnnotations()
JavaAnnotation getDeclaredAnnotation(JavaType annotationType)
JavaAnnotation getAnnotation(JavaType annotationType)
default boolean hasDeclaredAnnotation(java.lang.String annotationName)
annotationName - An unqualified name, such as "Deprecated" which does
 a quick check that doesn't require resolutions, or a qualified name such
 as "java.lang.annotation.Inherited" which uses resolutions to do its check.default boolean hasAnnotation(java.lang.String annotationName)
annotationName - An unqualified name, such as "Deprecated" which does
 a quick check that doesn't require resolutions, or a qualified name such
 as "java.lang.annotation.Inherited" which uses resolutions to do its check.