Class AnnotationRegistry
java.lang.Object
com.univocity.parsers.annotations.helpers.AnnotationRegistry
An internal registry of annotated elements and their properties that have been set via a
Copy
annotation.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<AnnotatedElement,
AnnotationRegistry.FieldAnnotations> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static final Object
getValue
(AnnotatedElement annotatedElement, Annotation annotation, String attribute) Returns the a value to a given annotation attribute that might have been modified by aCopy
annotationstatic final <T> T
getValue
(AnnotatedElement annotatedElement, Annotation annotation, String attribute, T valueIfNull) Returns the a value to a given annotation attribute that might have been modified by aCopy
annotationstatic final void
reset()
(package private) static final void
setValue
(AnnotatedElement annotatedElement, Annotation annotation, String attribute, Object newValue) Associates a value to a given annotation attribute
-
Field Details
-
modifiedAnnotations
-
-
Constructor Details
-
AnnotationRegistry
public AnnotationRegistry()
-
-
Method Details
-
setValue
static final void setValue(AnnotatedElement annotatedElement, Annotation annotation, String attribute, 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 aCopy
annotationannotation
- 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(AnnotatedElement annotatedElement, Annotation annotation, String attribute, T valueIfNull) Returns the a value to a given annotation attribute that might have been modified by aCopy
annotation- 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 aCopy
annotationannotation
- 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 Object getValue(AnnotatedElement annotatedElement, Annotation annotation, String attribute) Returns the a value to a given annotation attribute that might have been modified by aCopy
annotation- Parameters:
annotatedElement
- a method or field that has an annotation whose properties might have been changed by aCopy
annotationannotation
- 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
null
if it has not been modified by aCopy
-
reset
public static final void reset()
-