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.
|
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.
|
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 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 elementAnnotationMetadata
public AnnotationMetadata getAnnotationMetadata(Element parent, Element element)
parent
- The parentelement
- The elementAnnotationMetadata
public boolean isAnnotated(String declaringType, ExecutableElement method)
declaringType
- The declaring typemethod
- The methodpublic JavaAnnotationMetadataBuilder newAnnotationBuilder()
public JavaVisitorContext newVisitorContext()
JavaVisitorContext
.