Class AnnotationRegistry
- java.lang.Object
-
- com.univocity.parsers.annotations.helpers.AnnotationRegistry
-
public class AnnotationRegistry extends java.lang.ObjectAn internal registry of annotated elements and their properties that have been set via aCopyannotation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classAnnotationRegistry.AnnotationAttributesprivate static classAnnotationRegistry.FieldAnnotations
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.reflect.AnnotatedElement,AnnotationRegistry.FieldAnnotations>modifiedAnnotations
-
Constructor Summary
Constructors Constructor Description AnnotationRegistry()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.lang.ObjectgetValue(java.lang.reflect.AnnotatedElement annotatedElement, java.lang.annotation.Annotation annotation, java.lang.String attribute)Returns the a value to a given annotation attribute that might have been modified by aCopyannotationstatic <T> TgetValue(java.lang.reflect.AnnotatedElement annotatedElement, java.lang.annotation.Annotation annotation, java.lang.String attribute, T valueIfNull)Returns the a value to a given annotation attribute that might have been modified by aCopyannotationstatic voidreset()(package private) static voidsetValue(java.lang.reflect.AnnotatedElement annotatedElement, java.lang.annotation.Annotation annotation, java.lang.String attribute, java.lang.Object newValue)Associates a value to a given annotation attribute
-
-
-
Field Detail
-
modifiedAnnotations
private static final java.util.Map<java.lang.reflect.AnnotatedElement,AnnotationRegistry.FieldAnnotations> modifiedAnnotations
-
-
Method Detail
-
setValue
static final void setValue(java.lang.reflect.AnnotatedElement annotatedElement, java.lang.annotation.Annotation annotation, java.lang.String attribute, java.lang.Object newValue)Associates a value to a given annotation attribute- Parameters:
annotatedElement- a method or field that has an annotation whose properties are changed by aCopyannotationannotation- the altered annotation of the given annotatedElementattribute- the attribute of the altered annotationnewValue- the value of the given attribute of the altered annotation.
-
getValue
public static final <T> T getValue(java.lang.reflect.AnnotatedElement annotatedElement, java.lang.annotation.Annotation annotation, java.lang.String attribute, T valueIfNull)Returns the a value to a given annotation attribute that might have been modified by aCopyannotation- Type Parameters:
T- the expected value type to be returned by this method.- Parameters:
annotatedElement- a method or field that has an annotation whose properties might have been changed by aCopyannotationannotation- the possibly altered annotation of the given annotatedElementattribute- the attribute of the possibly altered annotationvalueIfNull- the value to return from the unmodified annotation, if it has not been changed by aCopy- Returns:
- the value associated with the given annotation property.
-
getValue
static final java.lang.Object getValue(java.lang.reflect.AnnotatedElement annotatedElement, java.lang.annotation.Annotation annotation, java.lang.String attribute)Returns the a value to a given annotation attribute that might have been modified by aCopyannotation- Parameters:
annotatedElement- a method or field that has an annotation whose properties might have been changed by aCopyannotationannotation- the possibly altered annotation of the given annotatedElementattribute- the attribute of the possibly altered annotation- Returns:
- the value associated with the given annotation property, or
nullif it has not been modified by aCopy
-
reset
public static final void reset()
-
-