abstract class AbstractAliasAwareAnnotationAttributeExtractor extends java.lang.Object implements AnnotationAttributeExtractor
AnnotationAttributeExtractor
implementations
that transparently enforce attribute alias semantics for annotation
attributes that are annotated with @AliasFor
.Annotation
,
AliasFor
,
AnnotationUtils.synthesizeAnnotation(Annotation, AnnotatedElement)
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.AnnotatedElement |
annotatedElement |
private java.lang.Class<? extends java.lang.annotation.Annotation> |
annotationType |
private java.util.Map<java.lang.String,java.lang.String> |
attributeAliasMap |
private java.lang.Object |
source |
Constructor and Description |
---|
AbstractAliasAwareAnnotationAttributeExtractor(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
java.lang.reflect.AnnotatedElement annotatedElement,
java.lang.Object source)
Construct a new
AbstractAliasAwareAnnotationAttributeExtractor . |
Modifier and Type | Method and Description |
---|---|
java.lang.reflect.AnnotatedElement |
getAnnotatedElement()
Get the element that is annotated with an annotation of the annotation
type supported by this extractor.
|
java.lang.Class<? extends java.lang.annotation.Annotation> |
getAnnotationType()
Get the type of annotation that this extractor extracts attribute
values for.
|
java.lang.Object |
getAttributeValue(java.lang.reflect.Method attributeMethod)
Get the attribute value from the underlying source
that corresponds to the supplied attribute method.
|
protected abstract java.lang.Object |
getRawAttributeValue(java.lang.reflect.Method attributeMethod)
Get the raw, unmodified attribute value from the underlying
source that corresponds to the supplied
attribute method.
|
protected abstract java.lang.Object |
getRawAttributeValue(java.lang.String attributeName)
Get the raw, unmodified attribute value from the underlying
source that corresponds to the supplied
attribute name.
|
java.lang.Object |
getSource()
Get the underlying source of annotation attributes.
|
private static boolean |
nullSafeEquals(java.lang.Object o1,
java.lang.Object o2) |
private static java.lang.String |
nullSafeToString(java.lang.Object obj) |
private final java.lang.Class<? extends java.lang.annotation.Annotation> annotationType
private final java.lang.reflect.AnnotatedElement annotatedElement
private final java.lang.Object source
private final java.util.Map<java.lang.String,java.lang.String> attributeAliasMap
AbstractAliasAwareAnnotationAttributeExtractor(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.lang.reflect.AnnotatedElement annotatedElement, java.lang.Object source)
AbstractAliasAwareAnnotationAttributeExtractor
.annotationType
- the annotation type to synthesize; never null
annotatedElement
- the element that is annotated with the annotation
of the supplied type; may be null
if unknownsource
- the underlying source of annotation attributes; never null
public final java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationType()
AnnotationAttributeExtractor
getAnnotationType
in interface AnnotationAttributeExtractor
public final java.lang.reflect.AnnotatedElement getAnnotatedElement()
AnnotationAttributeExtractor
getAnnotatedElement
in interface AnnotationAttributeExtractor
null
if unknownpublic java.lang.Object getSource()
AnnotationAttributeExtractor
getSource
in interface AnnotationAttributeExtractor
public final java.lang.Object getAttributeValue(java.lang.reflect.Method attributeMethod)
AnnotationAttributeExtractor
getAttributeValue
in interface AnnotationAttributeExtractor
attributeMethod
- an attribute method from the annotation type
supported by this extractorprotected abstract java.lang.Object getRawAttributeValue(java.lang.reflect.Method attributeMethod)
protected abstract java.lang.Object getRawAttributeValue(java.lang.String attributeName)
private static boolean nullSafeEquals(java.lang.Object o1, java.lang.Object o2)
private static java.lang.String nullSafeToString(java.lang.Object obj)