Interface AnnotationUtils

  • All Superinterfaces:
    Utils

    public interface AnnotationUtils
    extends Utils
    The utilities class for annotation in the package "javax.lang.model.*"
    Since:
    1.0.0
    Author:
    Mercy
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static java.util.List<javax.lang.model.element.AnnotationMirror> findAllAnnotations​(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.CharSequence annotatedTypeName, java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)  
      static java.util.List<javax.lang.model.element.AnnotationMirror> findAllAnnotations​(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.reflect.Type annotatedType, java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)  
      static java.util.List<javax.lang.model.element.AnnotationMirror> findAllAnnotations​(javax.lang.model.element.Element element, java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)  
      static java.util.List<javax.lang.model.element.AnnotationMirror> findAllAnnotations​(javax.lang.model.element.TypeElement element, java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)  
      static java.util.List<javax.lang.model.element.AnnotationMirror> findAllAnnotations​(javax.lang.model.type.TypeMirror type, java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)  
      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 java.util.List<javax.lang.model.element.AnnotationMirror> findAnnotations​(javax.lang.model.AnnotatedConstruct annotatedConstruct, java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)  
      static javax.lang.model.element.AnnotationMirror findMetaAnnotation​(javax.lang.model.element.Element annotatedConstruct, java.lang.CharSequence metaAnnotationClassName)  
      static javax.lang.model.element.AnnotationMirror findMetaAnnotation​(javax.lang.model.element.Element annotatedConstruct, java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationClass)  
      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.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.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 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 <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)  
      static boolean isAnnotationPresent​(javax.lang.model.element.Element element, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)  
      static boolean matchesAnnotationClass​(javax.lang.model.element.AnnotationMirror annotationMirror, java.lang.reflect.Type annotationType)  
      static boolean matchesAnnotationClassName​(javax.lang.model.element.AnnotationMirror annotationMirror, java.lang.CharSequence annotationClassName)  
    • Method Detail

      • getAnnotation

        static javax.lang.model.element.AnnotationMirror getAnnotation​(javax.lang.model.AnnotatedConstruct annotatedConstruct,
                                                                       java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
      • getAnnotation

        static javax.lang.model.element.AnnotationMirror getAnnotation​(javax.lang.model.AnnotatedConstruct annotatedConstruct,
                                                                       java.lang.CharSequence annotationClassName)
      • getAnnotations

        static java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotations​(javax.lang.model.AnnotatedConstruct annotatedConstruct)
      • getAnnotations

        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

        static java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotations​(javax.lang.model.AnnotatedConstruct annotatedConstruct,
                                                                                        java.lang.CharSequence annotationClassName)
      • getAllAnnotations

        static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations​(javax.lang.model.type.TypeMirror type)
      • getAllAnnotations

        static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations​(javax.lang.model.element.Element element)
      • getAllAnnotations

        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

        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

        static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations​(javax.lang.model.type.TypeMirror type,
                                                                                           java.lang.CharSequence annotationClassName)
      • getAllAnnotations

        static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations​(javax.lang.model.element.Element element,
                                                                                           java.lang.CharSequence annotationClassName)
      • getAllAnnotations

        static java.util.List<javax.lang.model.element.AnnotationMirror> getAllAnnotations​(javax.annotation.processing.ProcessingEnvironment processingEnv,
                                                                                           java.lang.reflect.Type annotatedType)
      • findAnnotation

        static javax.lang.model.element.AnnotationMirror findAnnotation​(javax.lang.model.type.TypeMirror type,
                                                                        java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
      • findAnnotation

        static javax.lang.model.element.AnnotationMirror findAnnotation​(javax.lang.model.type.TypeMirror type,
                                                                        java.lang.CharSequence annotationClassName)
      • findAnnotation

        static javax.lang.model.element.AnnotationMirror findAnnotation​(javax.lang.model.element.Element element,
                                                                        java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
      • findAnnotation

        static javax.lang.model.element.AnnotationMirror findAnnotation​(javax.lang.model.element.Element element,
                                                                        java.lang.CharSequence annotationClassName)
      • findMetaAnnotation

        static javax.lang.model.element.AnnotationMirror findMetaAnnotation​(javax.lang.model.element.Element annotatedConstruct,
                                                                            java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationClass)
      • findMetaAnnotation

        static javax.lang.model.element.AnnotationMirror findMetaAnnotation​(javax.lang.model.element.Element annotatedConstruct,
                                                                            java.lang.CharSequence metaAnnotationClassName)
      • isAnnotationPresent

        static boolean isAnnotationPresent​(javax.lang.model.element.Element element,
                                           java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
      • isAnnotationPresent

        static boolean isAnnotationPresent​(javax.lang.model.element.Element element,
                                           java.lang.CharSequence annotationClassName)
      • findAnnotations

        static java.util.List<javax.lang.model.element.AnnotationMirror> findAnnotations​(javax.lang.model.AnnotatedConstruct annotatedConstruct,
                                                                                         java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)
      • findAllAnnotations

        static java.util.List<javax.lang.model.element.AnnotationMirror> findAllAnnotations​(javax.lang.model.type.TypeMirror type,
                                                                                            java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)
      • findAllAnnotations

        static java.util.List<javax.lang.model.element.AnnotationMirror> findAllAnnotations​(javax.lang.model.element.TypeElement element,
                                                                                            java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)
      • findAllAnnotations

        static java.util.List<javax.lang.model.element.AnnotationMirror> findAllAnnotations​(javax.lang.model.element.Element element,
                                                                                            java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)
      • findAllAnnotations

        static java.util.List<javax.lang.model.element.AnnotationMirror> findAllAnnotations​(javax.annotation.processing.ProcessingEnvironment processingEnv,
                                                                                            java.lang.reflect.Type annotatedType,
                                                                                            java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)
      • findAllAnnotations

        static java.util.List<javax.lang.model.element.AnnotationMirror> findAllAnnotations​(javax.annotation.processing.ProcessingEnvironment processingEnv,
                                                                                            java.lang.CharSequence annotatedTypeName,
                                                                                            java.util.function.Predicate<? super javax.lang.model.element.AnnotationMirror>... annotationFilters)
      • matchesAnnotationClass

        static boolean matchesAnnotationClass​(javax.lang.model.element.AnnotationMirror annotationMirror,
                                              java.lang.reflect.Type annotationType)
      • matchesAnnotationClassName

        static boolean matchesAnnotationClassName​(javax.lang.model.element.AnnotationMirror annotationMirror,
                                                  java.lang.CharSequence annotationClassName)
      • getAttribute

        static <T> T getAttribute​(javax.lang.model.element.AnnotationMirror annotation,
                                  java.lang.String attributeName)
      • getAttribute

        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

        static <T> T getValue​(javax.lang.model.element.AnnotationMirror annotation)