Class AnnotationUtils
- java.lang.Object
-
- io.microsphere.annotation.processor.util.AnnotationUtils
-
public abstract class AnnotationUtils extends java.lang.Object
The utilities class for annotation in the package "javax.lang.model.*"- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description AnnotationUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.lang.model.element.AnnotationMirror
findAnnotation(javax.lang.model.element.Element element, java.lang.CharSequence annotationClassName)
static javax.lang.model.element.AnnotationMirror
findAnnotation(javax.lang.model.element.Element element, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
static javax.lang.model.element.AnnotationMirror
findAnnotation(javax.lang.model.type.TypeMirror type, java.lang.CharSequence annotationClassName)
static javax.lang.model.element.AnnotationMirror
findAnnotation(javax.lang.model.type.TypeMirror type, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
static javax.lang.model.element.AnnotationMirror
findMetaAnnotation(javax.lang.model.element.Element annotatedConstruct, java.lang.CharSequence metaAnnotationClassName)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAllAnnotations(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.CharSequence annotatedTypeName, java.util.function.Predicate<javax.lang.model.element.AnnotationMirror>... annotationFilters)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAllAnnotations(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.reflect.Type annotatedType)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAllAnnotations(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.reflect.Type annotatedType, java.util.function.Predicate<javax.lang.model.element.AnnotationMirror>... annotationFilters)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAllAnnotations(javax.lang.model.element.Element element)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAllAnnotations(javax.lang.model.element.Element element, java.lang.CharSequence annotationClassName)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAllAnnotations(javax.lang.model.element.Element element, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAllAnnotations(javax.lang.model.element.Element element, java.util.function.Predicate<javax.lang.model.element.AnnotationMirror>... annotationFilters)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAllAnnotations(javax.lang.model.type.TypeMirror type)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAllAnnotations(javax.lang.model.type.TypeMirror type, java.lang.CharSequence annotationClassName)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAllAnnotations(javax.lang.model.type.TypeMirror type, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAllAnnotations(javax.lang.model.type.TypeMirror type, java.util.function.Predicate<javax.lang.model.element.AnnotationMirror>... annotationFilters)
static javax.lang.model.element.AnnotationMirror
getAnnotation(javax.lang.model.AnnotatedConstruct annotatedConstruct, java.lang.CharSequence annotationClassName)
static javax.lang.model.element.AnnotationMirror
getAnnotation(javax.lang.model.AnnotatedConstruct annotatedConstruct, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAnnotations(javax.lang.model.AnnotatedConstruct annotatedConstruct)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAnnotations(javax.lang.model.AnnotatedConstruct annotatedConstruct, java.lang.CharSequence annotationClassName)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAnnotations(javax.lang.model.AnnotatedConstruct annotatedConstruct, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
static java.util.List<javax.lang.model.element.AnnotationMirror>
getAnnotations(javax.lang.model.AnnotatedConstruct annotatedConstruct, java.util.function.Predicate<javax.lang.model.element.AnnotationMirror>... annotationFilters)
static <T> T
getAttribute(java.util.Map<? extends javax.lang.model.element.ExecutableElement,? extends javax.lang.model.element.AnnotationValue> attributesMap, java.lang.String attributeName)
static <T> T
getAttribute(javax.lang.model.element.AnnotationMirror annotation, java.lang.String attributeName)
static <T> T
getValue(javax.lang.model.element.AnnotationMirror annotation)
static boolean
isAnnotationPresent(javax.lang.model.element.Element element, java.lang.CharSequence annotationClassName)
-
-
-
Method Detail
-
getAnnotation
public static javax.lang.model.element.AnnotationMirror getAnnotation(javax.lang.model.AnnotatedConstruct annotatedConstruct, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
-
getAnnotation
public static javax.lang.model.element.AnnotationMirror getAnnotation(javax.lang.model.AnnotatedConstruct annotatedConstruct, java.lang.CharSequence annotationClassName)
-
getAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotations(javax.lang.model.AnnotatedConstruct annotatedConstruct, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
-
getAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotations(javax.lang.model.AnnotatedConstruct annotatedConstruct, java.lang.CharSequence annotationClassName)
-
getAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotations(javax.lang.model.AnnotatedConstruct annotatedConstruct)
-
getAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotations(javax.lang.model.AnnotatedConstruct annotatedConstruct, java.util.function.Predicate<javax.lang.model.element.AnnotationMirror>... annotationFilters)
-
getAllAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations(javax.lang.model.type.TypeMirror type)
-
getAllAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations(javax.lang.model.element.Element element)
-
getAllAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations(javax.lang.model.type.TypeMirror type, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
-
getAllAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations(javax.lang.model.element.Element element, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
-
getAllAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations(javax.lang.model.type.TypeMirror type, java.lang.CharSequence annotationClassName)
-
getAllAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations(javax.lang.model.element.Element element, java.lang.CharSequence annotationClassName)
-
getAllAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations(javax.lang.model.type.TypeMirror type, java.util.function.Predicate<javax.lang.model.element.AnnotationMirror>... annotationFilters)
-
getAllAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations(javax.lang.model.element.Element element, java.util.function.Predicate<javax.lang.model.element.AnnotationMirror>... annotationFilters)
-
getAllAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.reflect.Type annotatedType)
-
getAllAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.reflect.Type annotatedType, java.util.function.Predicate<javax.lang.model.element.AnnotationMirror>... annotationFilters)
-
getAllAnnotations
public static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.CharSequence annotatedTypeName, java.util.function.Predicate<javax.lang.model.element.AnnotationMirror>... annotationFilters)
-
findAnnotation
public static javax.lang.model.element.AnnotationMirror findAnnotation(javax.lang.model.type.TypeMirror type, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
-
findAnnotation
public static javax.lang.model.element.AnnotationMirror findAnnotation(javax.lang.model.type.TypeMirror type, java.lang.CharSequence annotationClassName)
-
findAnnotation
public static javax.lang.model.element.AnnotationMirror findAnnotation(javax.lang.model.element.Element element, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
-
findAnnotation
public static javax.lang.model.element.AnnotationMirror findAnnotation(javax.lang.model.element.Element element, java.lang.CharSequence annotationClassName)
-
findMetaAnnotation
public static javax.lang.model.element.AnnotationMirror findMetaAnnotation(javax.lang.model.element.Element annotatedConstruct, java.lang.CharSequence metaAnnotationClassName)
-
isAnnotationPresent
public static boolean isAnnotationPresent(javax.lang.model.element.Element element, java.lang.CharSequence annotationClassName)
-
getAttribute
public static <T> T getAttribute(javax.lang.model.element.AnnotationMirror annotation, java.lang.String attributeName)
-
getAttribute
public static <T> T getAttribute(java.util.Map<? extends javax.lang.model.element.ExecutableElement,? extends javax.lang.model.element.AnnotationValue> attributesMap, java.lang.String attributeName)
-
getValue
public static <T> T getValue(javax.lang.model.element.AnnotationMirror annotation)
-
-