public class BasicAnnotationProvider extends java.lang.Object implements AnnotationProvider
| Constructor and Description |
|---|
BasicAnnotationProvider() |
| Modifier and Type | Method and Description |
|---|---|
javax.lang.model.element.AnnotationMirror |
getAnnotationMirror(com.sun.source.tree.Tree tree,
java.lang.Class<? extends java.lang.annotation.Annotation> target)
Return the annotation on
tree that is in the hierarchy that contains the qualifier
target. |
javax.lang.model.element.AnnotationMirror |
getDeclAnnotation(javax.lang.model.element.Element elt,
java.lang.Class<? extends java.lang.annotation.Annotation> anno)
Returns the AnnotationMirror, of the given class, used to annotate the element.
|
public javax.lang.model.element.AnnotationMirror getDeclAnnotation(javax.lang.model.element.Element elt,
java.lang.Class<? extends java.lang.annotation.Annotation> anno)
getDeclAnnotation in interface AnnotationProviderelt - the elementanno - annotation classanno on elt, or an equivalent one, or
null if none exists on annopublic javax.lang.model.element.AnnotationMirror getAnnotationMirror(com.sun.source.tree.Tree tree,
java.lang.Class<? extends java.lang.annotation.Annotation> target)
tree that is in the hierarchy that contains the qualifier
target. Returns null if none exists.
This implementation always returns null, because it has no access to any type hierarchy.
getAnnotationMirror in interface AnnotationProvidertree - the tree of which the annotation is returnedtarget - the class of the annotationtree that has the class target, or null