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

findAllMergedAnnotations

open static fun <A : Annotation> findAllMergedAnnotations(element: AnnotatedElement, annotationType: Class<A>): MutableSet<A>

Find all annotations of the specified annotationType within the annotation hierarchy above the supplied element; and for each annotation found, merge that annotation's attributes with matching attributes from annotations in lower levels of the annotation hierarchy and synthesize the results back into an annotation of the specified annotationType.

AliasFor semantics are fully supported, both within a single annotation and within annotation hierarchies.

This method follows find semantics as described in the AnnotatedElementUtils.

Parameters

element - the annotated element (never null)

annotationType - the annotation type to find (never null)

Return
the set of all merged, synthesized Annotations found, or an empty set if none were found

Since
4.3

See Also
#findMergedAnnotation(AnnotatedElement, Class)#getAllMergedAnnotations(AnnotatedElement, Class)