Document SynthesizedAnnotationInvocationHandler constructor

Issue: SPR-11512
This commit is contained in:
Sam Brannen 2015-05-24 15:09:22 +02:00
parent c13f689537
commit a1fc2097a1
2 changed files with 11 additions and 2 deletions

View File

@ -1061,7 +1061,7 @@ public abstract class AnnotationUtils {
return annotation;
}
InvocationHandler handler = new SynthesizedAnnotationInvocationHandler(annotatedElement, annotation,
InvocationHandler handler = new SynthesizedAnnotationInvocationHandler(annotation, annotatedElement,
getAttributeAliasMap(annotationType));
A synthesizedAnnotation = (A) Proxy.newProxyInstance(ClassUtils.getDefaultClassLoader(), new Class<?>[] {
(Class<A>) annotationType, SynthesizedAnnotation.class }, handler);

View File

@ -58,7 +58,16 @@ class SynthesizedAnnotationInvocationHandler implements InvocationHandler {
private final Map<String, String> aliasMap;
SynthesizedAnnotationInvocationHandler(AnnotatedElement annotatedElement, Annotation annotation,
/**
* Construct a new {@code SynthesizedAnnotationInvocationHandler}.
*
* @param annotation the annotation to synthesize
* @param annotatedElement the element that is annotated with the supplied
* annotation; may be {@code null} if unknown
* @param aliasMap the map of attribute alias pairs, declared via
* {@code @AliasFor} in the supplied annotation
*/
SynthesizedAnnotationInvocationHandler(Annotation annotation, AnnotatedElement annotatedElement,
Map<String, String> aliasMap) {
this.annotatedElement = annotatedElement;
this.annotation = annotation;