Class Annotations


  • public final class Annotations
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Annotations.Type  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Collection<java.lang.String> CONSTRAINT_OR_VISITOR_ANNOTATION_NAMES
      Reflection is also used to create constraint validators and plugin visitors.
      private static java.util.Collection<java.lang.String> FACTORY_ANNOTATION_NAMES
      These are static methods that must be reachable through reflection.
      private static java.util.Collection<java.lang.String> PARAMETER_ANNOTATION_NAMES
      These are fields, methods or parameters that correspond to Log4j configuration attributes, elements, and other injected elements.
      private static java.util.Collection<java.lang.String> PLUGIN_ANNOTATION_NAMES
      These must be public types with either: A factory method. A static method called newInstance. A public no-argument constructor.
      private java.util.Map<javax.lang.model.element.TypeElement,​Annotations.Type> typeElementToTypeMap  
    • Constructor Summary

      Constructors 
      Constructor Description
      Annotations​(javax.lang.model.util.Elements elements)  
    • Field Detail

      • PARAMETER_ANNOTATION_NAMES

        private static final java.util.Collection<java.lang.String> PARAMETER_ANNOTATION_NAMES
        These are fields, methods or parameters that correspond to Log4j configuration attributes, elements, and other injected elements.

        Note: The annotations listed here must also be declared in GraalVmProcessor.

      • FACTORY_ANNOTATION_NAMES

        private static final java.util.Collection<java.lang.String> FACTORY_ANNOTATION_NAMES
        These are static methods that must be reachable through reflection.

        Note: The annotations listed here must also be declared in GraalVmProcessor.

      • PLUGIN_ANNOTATION_NAMES

        private static final java.util.Collection<java.lang.String> PLUGIN_ANNOTATION_NAMES
        These must be public types with either:
        • A factory method.
        • A static method called newInstance.
        • A public no-argument constructor.

        Note: The annotations listed here must also be declared in GraalVmProcessor.

      • CONSTRAINT_OR_VISITOR_ANNOTATION_NAMES

        private static final java.util.Collection<java.lang.String> CONSTRAINT_OR_VISITOR_ANNOTATION_NAMES
        Reflection is also used to create constraint validators and plugin visitors.

        Note: The annotations listed here must also be declared in GraalVmProcessor.

      • typeElementToTypeMap

        private final java.util.Map<javax.lang.model.element.TypeElement,​Annotations.Type> typeElementToTypeMap
    • Constructor Detail

      • Annotations

        public Annotations​(javax.lang.model.util.Elements elements)
    • Method Detail

      • addTypeElementIfExists

        private void addTypeElementIfExists​(javax.lang.model.util.Elements elements,
                                            java.lang.CharSequence className,
                                            Annotations.Type type)
      • classifyAnnotation

        public Annotations.Type classifyAnnotation​(javax.lang.model.element.TypeElement element)
      • getAnnotationClassValue

        public javax.lang.model.element.Element getAnnotationClassValue​(javax.lang.model.element.Element element,
                                                                        javax.lang.model.element.TypeElement annotation)