FileDocCategorySizeDatePackage
AnnotatedElement.javaAPI DocAndroid 1.5 API2909Wed May 06 22:41:04 BST 2009java.lang.reflect

AnnotatedElement

public interface AnnotatedElement
This interface provides reflective access to annotation information.
since
Android 1.0

Fields Summary
Constructors Summary
Methods Summary
public TgetAnnotation(java.lang.Class annotationType)
Returns, for this element, the annotation with the specified type, or {@code null} if no annotation with the specified type is present (including inherited annotations).

param
annotationType the type of the annotation to search for
return
the annotation with the specified type or {@code null}
throws
NullPointerException if {@code annotationType} is {@code null}
since
Android 1.0

public java.lang.annotation.Annotation[]getAnnotations()
Returns, for this element, an array containing all annotations (including inherited annotations). If there are no annotations present, this method returns a zero length array.

return
an array of all annotations for this element
since
Android 1.0

public java.lang.annotation.Annotation[]getDeclaredAnnotations()
Returns, for this element, all annotations that are explicitly declared (not inherited). If there are no declared annotations present, this method returns a zero length array.

return
an array of annotations declared for this element
since
Android 1.0

public booleanisAnnotationPresent(java.lang.Class annotationType)
Indicates whether or not this element has an annotation with the specified annotation type (including inherited annotations).

param
annotationType the type of the annotation to search for
return
{@code true} if the annotation exists, {@code false} otherwise
throws
NullPointerException if {@code annotationType} is {@code null}
since
Android 1.0