Class AnnotatedElementAdapter
java.lang.Object
org.springframework.core.annotation.AnnotatedElementAdapter
- All Implemented Interfaces:
- Serializable, AnnotatedElement
Adapter for exposing a set of annotations as an 
AnnotatedElement, in
particular as input for various methods in AnnotatedElementUtils.- Since:
- 7.0
- Author:
- Juergen Hoeller, Sam Brannen
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionbooleanstatic AnnotatedElementAdapterfrom(Annotation @Nullable [] annotations) Create anAnnotatedElementAdapterfrom the supplied annotations.<A extends Annotation>
 @Nullable AgetAnnotation(Class<A> annotationClass) <A extends Annotation>
 @Nullable AgetDeclaredAnnotation(Class<A> annotationClass) inthashCode()booleanisAnnotationPresent(Class<? extends Annotation> annotationClass) booleanisEmpty()Determine if thisAnnotatedElementAdapteris empty.toString()Methods inherited from interface AnnotatedElementgetAnnotationsByType, getDeclaredAnnotationsByType
- 
Method Details- 
fromCreate anAnnotatedElementAdapterfrom the supplied annotations.The supplied annotations will be considered to be both present and directly present with regard to the results returned from methods such as getAnnotation(Class),getDeclaredAnnotation(Class), etc.If the supplied annotations array is either nullor empty, this factory method will return an empty adapter.- Parameters:
- annotations- the annotations to expose via the- AnnotatedElementAPI
- Returns:
- a new AnnotatedElementAdapter
 
- 
isAnnotationPresent- Specified by:
- isAnnotationPresentin interface- AnnotatedElement
 
- 
getAnnotation- Specified by:
- getAnnotationin interface- AnnotatedElement
 
- 
getAnnotations- Specified by:
- getAnnotationsin interface- AnnotatedElement
 
- 
getDeclaredAnnotation- Specified by:
- getDeclaredAnnotationin interface- AnnotatedElement
 
- 
getDeclaredAnnotations- Specified by:
- getDeclaredAnnotationsin interface- AnnotatedElement
 
- 
isEmptypublic boolean isEmpty()Determine if thisAnnotatedElementAdapteris empty.- Returns:
- trueif this adapter contains no annotations
 
- 
equals
- 
hashCode
- 
toString
 
-