类的使用
cn.taketoday.core.annotation.AnnotationAttributes
使用AnnotationAttributes的程序包
程序包
说明
Core support package for annotations, meta-annotations, and merged
annotations with attribute overrides.
-
cn.taketoday.core.annotation中AnnotationAttributes的使用
修饰符和类型方法说明MergedAnnotation.asAnnotationAttributes(MergedAnnotation.Adapt... adaptations) Create a new mutableAnnotationAttributesinstance from this merged annotation.static AnnotationAttributesAnnotatedElementUtils.findMergedAnnotationAttributes(AnnotatedElement element, Class<? extends Annotation> annotationType, boolean classValuesAsString, boolean nestedAnnotationsAsMap) Find the first annotation of the specifiedannotationTypewithin the annotation hierarchy above the suppliedelementand merge that annotation's attributes with matching attributes from annotations in lower levels of the annotation hierarchy.static AnnotationAttributesAnnotatedElementUtils.findMergedAnnotationAttributes(AnnotatedElement element, String annotationName, boolean classValuesAsString, boolean nestedAnnotationsAsMap) Find the first annotation of the specifiedannotationNamewithin the annotation hierarchy above the suppliedelementand merge that annotation's attributes with matching attributes from annotations in lower levels of the annotation hierarchy.static AnnotationAttributesReturn anAnnotationAttributesinstance based on the given map.static AnnotationAttributesAnnotationAttributes.fromMetadata(AnnotatedTypeMetadata metadata, Class<?> annotationClass) static AnnotationAttributesAnnotationAttributes.fromMetadata(AnnotatedTypeMetadata metadata, String annotationClassName) AnnotationAttributes.getAnnotation(String attributeName) Get theAnnotationAttributesstored under the specifiedattributeName.AnnotationAttributes.getAnnotationArray(String attributeName) Get the array ofAnnotationAttributesstored under the specifiedattributeName.static AnnotationAttributesAnnotationUtils.getAnnotationAttributes(Annotation annotation, boolean classValuesAsString, boolean nestedAnnotationsAsMap) Retrieve the given annotation's attributes as anAnnotationAttributesmap.static AnnotationAttributesAnnotationUtils.getAnnotationAttributes(AnnotatedElement annotatedElement, Annotation annotation) Retrieve the given annotation's attributes as anAnnotationAttributesmap.static AnnotationAttributesAnnotationUtils.getAnnotationAttributes(AnnotatedElement annotatedElement, Annotation annotation, boolean classValuesAsString, boolean nestedAnnotationsAsMap) Retrieve the given annotation's attributes as anAnnotationAttributesmap.default AnnotationAttributesAnnotationProvider.getAttributes(AnnotatedTypeMetadata metadata) <A extends Annotation>
AnnotationAttributes[]MergedAnnotations.getAttributes(Class<A> annotationType) static AnnotationAttributesAnnotatedElementUtils.getMergedAnnotationAttributes(AnnotatedElement element, Class<? extends Annotation> annotationType) Get the first annotation of the specifiedannotationTypewithin the annotation hierarchy above the suppliedelementand merge that annotation's attributes with matching attributes from annotations in lower levels of the annotation hierarchy.static AnnotationAttributesAnnotatedElementUtils.getMergedAnnotationAttributes(AnnotatedElement element, String annotationName) Get the first annotation of the specifiedannotationNamewithin the annotation hierarchy above the suppliedelementand merge that annotation's attributes with matching attributes from annotations in lower levels of the annotation hierarchy.static AnnotationAttributesAnnotatedElementUtils.getMergedAnnotationAttributes(AnnotatedElement element, String annotationName, boolean classValuesAsString, boolean nestedAnnotationsAsMap) Get the first annotation of the specifiedannotationNamewithin the annotation hierarchy above the suppliedelementand merge that annotation's attributes with matching attributes from annotations in lower levels of the annotation hierarchy.static <A extends Annotation>
AnnotationAttributes[]AnnotatedElementUtils.getMergedAttributesArray(AnnotatedElement annotated, Class<A> annotationType) 修饰符和类型方法说明static voidAnnotationUtils.postProcessAnnotationAttributes(Object annotatedElement, AnnotationAttributes attributes, boolean classValuesAsString) Post-process the suppliedAnnotationAttributes, preserving nested annotations asAnnotationinstances.static voidAnnotationUtils.registerDefaultValues(AnnotationAttributes attributes) Register the annotation-declared default values for the given attributes, if available.限定符构造器说明Create a newAnnotationAttributesinstance, wrapping the provided map and all its key-value pairs.