接口 AnnotationMetadata
- 所有超级接口:
AnnotatedTypeMetadata,ClassMetadata
Interface that defines abstract access to the annotations of a specific
class, in a form that does not require that class to be loaded yet.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, Mark Fisher, Phillip Webb, Sam Brannen, Harry Yang
- 另请参阅:
-
方法概要
修饰符和类型方法说明getAnnotatedMethods(String annotationName) Retrieve the method metadata for all methods that are annotated (or meta-annotated) with the given annotation type.default booleanhasAnnotatedMethods(String annotationName) Determine whether the underlying class has any methods that are annotated (or meta-annotated) with the given annotation type.static AnnotationMetadataintrospect(Class<?> type) Factory method to create a newAnnotationMetadatainstance for the given class using standard reflection.从接口继承的方法 cn.taketoday.core.type.AnnotatedTypeMetadata
getAllAnnotationAttributes, getAllAnnotationAttributes, getAllAnnotationAttributes, getAllAnnotationAttributes, getAnnotation, getAnnotation, getAnnotationAttributes, getAnnotationAttributes, getAnnotationAttributes, getAnnotationAttributes, getAnnotations, getAnnotationTypes, 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
-
方法详细资料
-
hasAnnotatedMethods
Determine whether the underlying class has any methods that are annotated (or meta-annotated) with the given annotation type.- 参数:
annotationName- the fully qualified class name of the annotation type to look for
-
getAnnotatedMethods
Retrieve 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.- 参数:
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.
-
introspect
Factory method to create a newAnnotationMetadatainstance for the given class using standard reflection.- 参数:
type- the class to introspect- 返回:
- a new
AnnotationMetadatainstance
-