类的使用
cn.taketoday.core.annotation.AnnotationAttributes
使用AnnotationAttributes的程序包
程序包
说明
Core support package for annotations, meta-annotations, and merged
annotations with attribute overrides.
Core support package for type introspection.
-
cn.taketoday.core.annotation中AnnotationAttributes的使用
修饰符和类型方法说明AbstractMergedAnnotation.asAnnotationAttributes(MergedAnnotation.Adapt... adaptations) MergedAnnotation.asAnnotationAttributes(MergedAnnotation.Adapt... adaptations) Create a new mutableAnnotationAttributesinstance from this merged annotation.MissingMergedAnnotation.asAnnotationAttributes(MergedAnnotation.Adapt... adaptations) 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.private static AnnotationAttributesAnnotatedElementUtils.getAnnotationAttributes(MergedAnnotation<?> annotation, boolean classValuesAsString, boolean nestedAnnotationsAsMap) 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) <A extends Annotation>
AnnotationAttributes[]MergedAnnotationsCollection.getAttributes(Class<A> annotationType) <A extends Annotation>
AnnotationAttributes[]TypeMappedAnnotations.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. -
cn.taketoday.core.type中AnnotationAttributes的使用
返回变量类型为AnnotationAttributes的类型的cn.taketoday.core.type中的方法修饰符和类型方法说明default Set<AnnotationAttributes>AnnotatedTypeMetadata.getMergedRepeatableAnnotationAttributes(Class<? extends Annotation> annotationType, Class<? extends Annotation> containerType, boolean classValuesAsString) Retrieve all repeatable annotations of the given type within the annotation hierarchy above the underlying element (as direct annotation or meta-annotation); and for each annotation found, merge that annotation's attributes with matching attributes from annotations in lower levels of the annotation hierarchy and store the results in an instance ofAnnotationAttributes.default Set<AnnotationAttributes>AnnotatedTypeMetadata.getMergedRepeatableAnnotationAttributes(Class<? extends Annotation> annotationType, Class<? extends Annotation> containerType, boolean classValuesAsString, boolean sortByReversedMetaDistance) Retrieve all repeatable annotations of the given type within the annotation hierarchy above the underlying element (as direct annotation or meta-annotation); and for each annotation found, merge that annotation's attributes with matching attributes from annotations in lower levels of the annotation hierarchy and store the results in an instance ofAnnotationAttributes.