public class AnnotationUtils extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AnnotationUtils(Elements elementUtils,
Messager messager,
Types types,
ModelUtils modelUtils,
Filer filer)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
AnnotationMetadata |
getAnnotationMetadata(Element element)
Get the annotation metadata for the given element.
|
AnnotationMetadata |
getAnnotationMetadata(Element parent,
Element element)
Get the annotation metadata for the given element.
|
protected boolean |
hasStereotype(Element element,
Class<? extends Annotation> stereotype)
Return whether the given element is annotated with the given annotation stereotype.
|
protected boolean |
hasStereotype(Element element,
List<String> stereotypes)
Return whether the given element is annotated with any of the given annotation stereotypes.
|
protected boolean |
hasStereotype(Element element,
String... stereotypes)
Return whether the given element is annotated with the given annotation stereotypes.
|
boolean |
isAnnotated(ExecutableElement method)
Check whether the method is annotated.
|
JavaAnnotationMetadataBuilder |
newAnnotationBuilder()
Creates a new annotation builder.
|
protected AnnotationUtils(Elements elementUtils, Messager messager, Types types, ModelUtils modelUtils, Filer filer)
elementUtils - The elementsmessager - The messagertypes - The typesmodelUtils - The model utilsfiler - The filerprotected boolean hasStereotype(Element element, Class<? extends Annotation> stereotype)
element - The elementstereotype - The stereotypeprotected boolean hasStereotype(Element element, String... stereotypes)
element - The elementstereotypes - The stereotypesprotected boolean hasStereotype(Element element, List<String> stereotypes)
element - The elementstereotypes - The stereotypespublic AnnotationMetadata getAnnotationMetadata(Element element)
element - The elementAnnotationMetadatapublic AnnotationMetadata getAnnotationMetadata(Element parent, Element element)
parent - The parentelement - The elementAnnotationMetadatapublic boolean isAnnotated(ExecutableElement method)
method - The methodpublic JavaAnnotationMetadataBuilder newAnnotationBuilder()