Skip to content

Commit a1fc209

Browse files
committed
Document SynthesizedAnnotationInvocationHandler constructor
Issue: SPR-11512
1 parent c13f689 commit a1fc209

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ public static <A extends Annotation> A synthesizeAnnotation(A annotation, Annota
10611061
return annotation;
10621062
}
10631063

1064-
InvocationHandler handler = new SynthesizedAnnotationInvocationHandler(annotatedElement, annotation,
1064+
InvocationHandler handler = new SynthesizedAnnotationInvocationHandler(annotation, annotatedElement,
10651065
getAttributeAliasMap(annotationType));
10661066
A synthesizedAnnotation = (A) Proxy.newProxyInstance(ClassUtils.getDefaultClassLoader(), new Class<?>[] {
10671067
(Class<A>) annotationType, SynthesizedAnnotation.class }, handler);

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,16 @@ class SynthesizedAnnotationInvocationHandler implements InvocationHandler {
5858
private final Map<String, String> aliasMap;
5959

6060

61-
SynthesizedAnnotationInvocationHandler(AnnotatedElement annotatedElement, Annotation annotation,
61+
/**
62+
* Construct a new {@code SynthesizedAnnotationInvocationHandler}.
63+
*
64+
* @param annotation the annotation to synthesize
65+
* @param annotatedElement the element that is annotated with the supplied
66+
* annotation; may be {@code null} if unknown
67+
* @param aliasMap the map of attribute alias pairs, declared via
68+
* {@code @AliasFor} in the supplied annotation
69+
*/
70+
SynthesizedAnnotationInvocationHandler(Annotation annotation, AnnotatedElement annotatedElement,
6271
Map<String, String> aliasMap) {
6372
this.annotatedElement = annotatedElement;
6473
this.annotation = annotation;

0 commit comments

Comments
 (0)