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 has the class target . |
javax.lang.model.element.AnnotationMirror |
getDeclAnnotation(javax.lang.model.element.Element elt,
java.lang.Class<? extends java.lang.annotation.Annotation> anno)
Returns the actual annotation mirror used to annotate this type, whose name equals the passed
annotationName if one exists, null otherwise.
|
public javax.lang.model.element.AnnotationMirror getDeclAnnotation(javax.lang.model.element.Element elt, java.lang.Class<? extends java.lang.annotation.Annotation> anno)
AnnotationProvider
getDeclAnnotation
in interface AnnotationProvider
anno
- annotation classpublic javax.lang.model.element.AnnotationMirror getAnnotationMirror(com.sun.source.tree.Tree tree, java.lang.Class<? extends java.lang.annotation.Annotation> target)
AnnotationProvider
tree
that has the class target
. If no annotation for
the given target class exists, the result is null
getAnnotationMirror
in interface AnnotationProvider
tree
- the tree of which the annotation is returnedtarget
- the class of the annotation