类 StandardAnnotationMetadata
java.lang.Object
cn.taketoday.core.type.StandardClassMetadata
cn.taketoday.core.type.StandardAnnotationMetadata
- 所有已实现的接口:
AnnotatedTypeMetadata,AnnotationMetadata,ClassMetadata
AnnotationMetadata implementation that uses standard reflection
to introspect a given Class.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, Mark Fisher, Chris Beams, Phillip Webb, Sam Brannen
-
字段概要
字段 -
构造器概要
构造器构造器说明StandardAnnotationMetadata(Class<?> introspectedClass) Create a newStandardAnnotationMetadatawrapper for the given Class.StandardAnnotationMetadata(Class<?> introspectedClass, boolean nestedAnnotationsAsMap) Create a newStandardAnnotationMetadatawrapper for the given Class, providing the option to return any nested annotations or annotation arrays in the form ofAnnotationAttributesinstead of actualAnnotationinstances. -
方法概要
修饰符和类型方法说明(专用程序包) static AnnotationMetadatagetAllAnnotationAttributes(String annotationName, boolean classValuesAsString) Retrieve all attributes of all annotations of the given type, if any (i.e. if defined on the underlying element, as direct annotation or meta-annotation).getAnnotatedMethods(String annotationName) Retrieve the method metadata for all methods that are annotated (or meta-annotated) with the given annotation type.getAnnotationAttributes(String annotationName, boolean classValuesAsString) Retrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying element, as direct annotation or meta-annotation).Get annotation details based on the direct annotations and meta-annotations of the underlying element.Get the fully qualified class names of all annotation types that are present on the underlying class.booleanhasAnnotatedMethods(String annotationName) Determine whether the underlying class has any methods that are annotated (or meta-annotated) with the given annotation type.private static booleanisAnnotatedMethod(Method method, String annotationName) protected MethodMetadata从类继承的方法 cn.taketoday.core.type.StandardClassMetadata
equals, getClassName, getDeclaredMethods, getEnclosingClassName, getInterfaceNames, getIntrospectedClass, getMemberClassNames, getModifiers, getSuperClassName, hashCode, isAbstract, isAnnotation, isFinal, isIndependent, isInterface, toString从接口继承的方法 cn.taketoday.core.type.AnnotatedTypeMetadata
getAllAnnotationAttributes, getAllAnnotationAttributes, getAllAnnotationAttributes, getAnnotation, getAnnotation, getAnnotationAttributes, getAnnotationAttributes, getAnnotationAttributes, getMergedRepeatableAnnotation, getMergedRepeatableAnnotation, getMergedRepeatableAnnotation, getMergedRepeatableAnnotationAttributes, getMergedRepeatableAnnotationAttributes, getMergedRepeatableAnnotationAttributes, getMetaAnnotationTypes, getMetaAnnotationTypes, hasAnnotation, hasAnnotation, hasMetaAnnotation, hasMetaAnnotation, isAnnotated, isAnnotated从接口继承的方法 cn.taketoday.core.type.ClassMetadata
getClassName, getDeclaredMethods, getEnclosingClassName, getInterfaceNames, getMemberClassNames, getModifiers, getSuperClassName, hasEnclosingClass, hasSuperClass, isAbstract, isAnnotation, isConcrete, isFinal, isIndependent, isInterface
-
字段详细资料
-
mergedAnnotations
-
nestedAnnotationsAsMap
private final boolean nestedAnnotationsAsMap -
annotationTypes
-
-
构造器详细资料
-
StandardAnnotationMetadata
Create a newStandardAnnotationMetadatawrapper for the given Class.- 参数:
introspectedClass- the Class to introspect- 另请参阅:
-
StandardAnnotationMetadata
Create a newStandardAnnotationMetadatawrapper for the given Class, providing the option to return any nested annotations or annotation arrays in the form ofAnnotationAttributesinstead of actualAnnotationinstances.- 参数:
introspectedClass- the Class to introspectnestedAnnotationsAsMap- return nested annotations and annotation arrays asAnnotationAttributesfor compatibility with ASM-basedAnnotationMetadataimplementations
-
-
方法详细资料
-
getAnnotations
从接口复制的说明:AnnotatedTypeMetadataGet annotation details based on the direct annotations and meta-annotations of the underlying element.- 指定者:
getAnnotations在接口中AnnotatedTypeMetadata- 返回:
- merged annotations based on the direct annotations and meta-annotations
-
getAnnotationTypes
从接口复制的说明:AnnotatedTypeMetadataGet the fully qualified class names of all annotation types that are present on the underlying class.- 指定者:
getAnnotationTypes在接口中AnnotatedTypeMetadata- 返回:
- the annotation type names
-
getAnnotationAttributes
@Nullable public Map<String,Object> getAnnotationAttributes(String annotationName, boolean classValuesAsString) 从接口复制的说明:AnnotatedTypeMetadataRetrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying element, as direct annotation or meta-annotation).@AliasForsemantics are fully supported, both within a single annotation and within annotation hierarchies.- 指定者:
getAnnotationAttributes在接口中AnnotatedTypeMetadata- 参数:
annotationName- the fully-qualified class name of the annotation type to look forclassValuesAsString- whether to convert class references to String class names for exposure as values in the returned Map, instead of Class references which might potentially have to be loaded first- 返回:
- a
Mapof attributes, with each annotation attribute name as map key (e.g. "location") and the attribute's value as map value; ornullif no matching annotation is found
-
getAllAnnotationAttributes
@Nullable public MultiValueMap<String,Object> getAllAnnotationAttributes(String annotationName, boolean classValuesAsString) 从接口复制的说明:AnnotatedTypeMetadataRetrieve all attributes of all annotations of the given type, if any (i.e. if defined on the underlying element, as direct annotation or meta-annotation). Note that this variant does not take attribute overrides into account.- 指定者:
getAllAnnotationAttributes在接口中AnnotatedTypeMetadata- 参数:
annotationName- the fully qualified class name of the annotation type to look forclassValuesAsString- whether to convert class references to String- 返回:
- a MultiMap of attributes, with the attribute name as key (e.g. "value")
and a list of the defined attribute values as Map value. This return value will
be
nullif no matching annotation is defined. - 另请参阅:
-
hasAnnotatedMethods
从接口复制的说明:AnnotationMetadataDetermine whether the underlying class has any methods that are annotated (or meta-annotated) with the given annotation type.- 指定者:
hasAnnotatedMethods在接口中AnnotationMetadata- 参数:
annotationName- the fully qualified class name of the annotation type to look for
-
getAnnotatedMethods
从接口复制的说明:AnnotationMetadataRetrieve the method metadata for all methods that are annotated (or meta-annotated) with the given annotation type.For any returned method,
AnnotatedTypeMetadata.isAnnotated(java.lang.Class<? extends java.lang.annotation.Annotation>)will returntruefor the given annotation type.- 指定者:
getAnnotatedMethods在接口中AnnotationMetadata- 参数:
annotationName- the fully qualified class name of the annotation type to look for- 返回:
- a set of
MethodMetadatafor methods that have a matching annotation. The return value will be an empty set if no methods match the annotation type.
-
mapMethod
- 覆盖:
mapMethod在类中StandardClassMetadata
-
isAnnotatedMethod
-
from
-