spring-framework / org.springframework.core.annotation / AnnotatedElementUtils / getAllAnnotationAttributes

getAllAnnotationAttributes

@Nullable open static fun getAllAnnotationAttributes(element: AnnotatedElement, annotationName: String): MultiValueMap<String, Any>

Get the annotation attributes of all annotations of the specified annotationName in the annotation hierarchy above the supplied AnnotatedElement and store the results in a MultiValueMap.

Note: in contrast to #getMergedAnnotationAttributes(AnnotatedElement, String), this method does not support attribute overrides.

This method follows get semantics as described in the AnnotatedElementUtils.

Parameters

element - the annotated element

annotationName - the fully qualified class name of the annotation type to find

Return
a MultiValueMap keyed by attribute name, containing the annotation attributes from all annotations found, or null if not found

See Also
#getAllAnnotationAttributes(AnnotatedElement, String, boolean, boolean)

@Nullable open static fun getAllAnnotationAttributes(element: AnnotatedElement, annotationName: String, classValuesAsString: Boolean, nestedAnnotationsAsMap: Boolean): MultiValueMap<String, Any>

Get the annotation attributes of all annotations of the specified annotationName in the annotation hierarchy above the supplied AnnotatedElement and store the results in a MultiValueMap.

Note: in contrast to #getMergedAnnotationAttributes(AnnotatedElement, String), this method does not support attribute overrides.

This method follows get semantics as described in the AnnotatedElementUtils.

Parameters

element - the annotated element

annotationName - the fully qualified class name of the annotation type to find

classValuesAsString - whether to convert Class references into Strings or to preserve them as Class references

nestedAnnotationsAsMap - whether to convert nested Annotation instances into AnnotationAttributes maps or to preserve them as Annotation instances

Return
a MultiValueMap keyed by attribute name, containing the annotation attributes from all annotations found, or null if not found