| Modifier | Constructor and Description |
|---|---|
protected |
AnnotationUtils(ProcessingEnvironment processingEnv,
Elements elementUtils,
Messager messager,
Types types,
ModelUtils modelUtils,
GenericUtils genericUtils,
Filer filer)
Default constructor.
|
protected |
AnnotationUtils(ProcessingEnvironment processingEnv,
Elements elementUtils,
Messager messager,
Types types,
ModelUtils modelUtils,
GenericUtils genericUtils,
Filer filer,
MutableConvertibleValues<Object> visitorAttributes)
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 and the given parent.
|
AnnotationMetadata |
getAnnotationMetadata(List<Element> parents,
Element element)
Get the annotation metadata for the given element and the given parents.
|
AnnotationMetadata |
getDeclaredAnnotationMetadata(Element element)
Get the declared annotation metadata for the given element.
|
AnnotatedElementValidator |
getElementValidator()
The
AnnotatedElementValidator instance. |
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.
|
static void |
invalidateMetadata(Element element)
Invalidates any cached metadata.
|
boolean |
isAnnotated(String declaringType,
ExecutableElement method)
Check whether the method is annotated.
|
JavaAnnotationMetadataBuilder |
newAnnotationBuilder()
Creates a new annotation builder.
|
JavaVisitorContext |
newVisitorContext()
Creates a new
JavaVisitorContext. |
protected AnnotationUtils(ProcessingEnvironment processingEnv, Elements elementUtils, Messager messager, Types types, ModelUtils modelUtils, GenericUtils genericUtils, Filer filer, MutableConvertibleValues<Object> visitorAttributes)
processingEnv - The processing envelementUtils - The elementsmessager - The messagertypes - The typesmodelUtils - The model utilsgenericUtils - The generic utilsfiler - The filervisitorAttributes - The visitor attributesprotected AnnotationUtils(ProcessingEnvironment processingEnv, Elements elementUtils, Messager messager, Types types, ModelUtils modelUtils, GenericUtils genericUtils, Filer filer)
processingEnv - The processing envelementUtils - The elementsmessager - The messagertypes - The typesmodelUtils - The model utilsgenericUtils - The generic utilsfiler - The filer@Nullable public AnnotatedElementValidator getElementValidator()
AnnotatedElementValidator instance. Can be null.protected 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 getDeclaredAnnotationMetadata(Element element)
element - The elementAnnotationMetadatapublic AnnotationMetadata getAnnotationMetadata(Element parent, Element element)
parent - The parentelement - The elementAnnotationMetadatapublic AnnotationMetadata getAnnotationMetadata(List<Element> parents, Element element)
parents - The parentselement - The elementAnnotationMetadatapublic boolean isAnnotated(String declaringType, ExecutableElement method)
declaringType - The declaring typemethod - The methodpublic JavaAnnotationMetadataBuilder newAnnotationBuilder()
public JavaVisitorContext newVisitorContext()
JavaVisitorContext.