S
- the type of source supported by this extractorabstract class AbstractAliasAwareAnnotationAttributeExtractor<S> extends java.lang.Object implements AnnotationAttributeExtractor<S>
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.util.List<java.lang.String>> |
attributeAliasMap |
private S |
source |
Constructor and Description |
---|
AbstractAliasAwareAnnotationAttributeExtractor(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
java.lang.reflect.AnnotatedElement annotatedElement,
S 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.
|
S |
getSource()
Get the underlying source of annotation attributes.
|
private final java.lang.Class<? extends java.lang.annotation.Annotation> annotationType
private final java.lang.reflect.AnnotatedElement annotatedElement
private final S source
private final java.util.Map<java.lang.String,java.util.List<java.lang.String>> attributeAliasMap
AbstractAliasAwareAnnotationAttributeExtractor(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.lang.reflect.AnnotatedElement annotatedElement, S 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<S>
public final java.lang.reflect.AnnotatedElement getAnnotatedElement()
AnnotationAttributeExtractor
getAnnotatedElement
in interface AnnotationAttributeExtractor<S>
null
if unknownpublic final S getSource()
AnnotationAttributeExtractor
getSource
in interface AnnotationAttributeExtractor<S>
public final java.lang.Object getAttributeValue(java.lang.reflect.Method attributeMethod)
AnnotationAttributeExtractor
getAttributeValue
in interface AnnotationAttributeExtractor<S>
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)