Class Annotations
- java.lang.Object
-
- org.apache.logging.log4j.core.config.plugins.processor.internal.Annotations
-
public final class Annotations extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnnotations.Type
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Collection<java.lang.String>CONSTRAINT_OR_VISITOR_ANNOTATION_NAMESReflection is also used to create constraint validators and plugin visitors.private static java.util.Collection<java.lang.String>FACTORY_ANNOTATION_NAMESThese are static methods that must be reachable through reflection.private static java.util.Collection<java.lang.String>PARAMETER_ANNOTATION_NAMESThese 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_NAMESThese must be public types with either: A factory method. A static method callednewInstance. 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddTypeElementIfExists(javax.lang.model.util.Elements elements, java.lang.CharSequence className, Annotations.Type type)Annotations.TypeclassifyAnnotation(javax.lang.model.element.TypeElement element)javax.lang.model.element.ElementgetAnnotationClassValue(javax.lang.model.element.Element element, javax.lang.model.element.TypeElement annotation)
-
-
-
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
-
-
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)
-
-