| java.lang.reflect.AnnotatedElement
All known Subclasses: java.lang.reflect.AccessibleObject, java.lang.Class,
AnnotatedElement | public interface AnnotatedElement (Code) | | An interface implemented an annotated element to enable reflective access to
annotation information.
since: 1.5 |
getAnnotation | T getAnnotation(Class<T> annotationType)(Code) | | Gets the
Annotation for this element for the annotation type
passed, if it exists.
Parameters: annotationType - The Class instance of the annotation to search for. The Annotation for this element or null . throws: NullPointerException - if annotationType is null . |
getDeclaredAnnotations | Annotation[] getDeclaredAnnotations()(Code) | | Gets all
Annotation s that are explicitly declared by this
element (not inherited).
An array of Annotations, which may be empty, but nevernull . |
isAnnotationPresent | boolean isAnnotationPresent(Class<? extends Annotation> annotationType)(Code) | | Determines if this element has an annotation for the annotation type
passed.
Parameters: annotationType - The class instance of the annotation to search for. true if the annotation exists, otherwisefalse . throws: NullPointerException - if annotationType is null . |
|
|