Skip to content

Commit 37255af

Browse files
philwebbjhoeller
authored andcommitted
Complete migration of annotation utility methods
Delete `InternalAnnotationUtils` and `InternalAnnotatedElementUtils` and migrate exclusively to the new `MergedAnnotations` API. Closes gh-22562
1 parent a14bfe9 commit 37255af

14 files changed

+367
-6098
lines changed

spring-core/src/main/java/org/springframework/core/annotation/AbstractAliasAwareAnnotationAttributeExtractor.java

Lines changed: 0 additions & 138 deletions
This file was deleted.

spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,7 @@
5151
* <h3>Usage Requirements</h3>
5252
* <p>Like with any annotation in Java, the mere presence of {@code @AliasFor}
5353
* on its own will not enforce alias semantics. For alias semantics to be
54-
* enforced, annotations must be <em>loaded</em> via the utility methods in
55-
* {@link AnnotationUtils}. Behind the scenes, Spring will <em>synthesize</em>
56-
* an annotation by wrapping it in a dynamic proxy that transparently enforces
57-
* <em>attribute alias</em> semantics for annotation attributes that are
58-
* annotated with {@code @AliasFor}. Similarly, {@link AnnotatedElementUtils}
59-
* supports explicit meta-annotation attribute overrides when {@code @AliasFor}
60-
* is used within an annotation hierarchy. Typically you will not need to
61-
* manually synthesize annotations on your own since Spring will do that for
62-
* you transparently when looking up annotations on Spring-managed components.
54+
* enforced, annotations must be <em>loaded</em> via {@link MergedAnnotations}.
6355
*
6456
* <h3>Implementation Requirements</h3>
6557
* <ul>
@@ -176,9 +168,7 @@
176168
*
177169
* @author Sam Brannen
178170
* @since 4.2
179-
* @see AnnotatedElementUtils
180-
* @see AnnotationUtils
181-
* @see AnnotationUtils#synthesizeAnnotation(Annotation, java.lang.reflect.AnnotatedElement)
171+
* @see MergedAnnotations
182172
* @see SynthesizedAnnotation
183173
*/
184174
@Retention(RetentionPolicy.RUNTIME)

0 commit comments

Comments
 (0)