public class SynthesizingMethodParameter extends MethodParameter
MethodParameter
variant which synthesizes annotations that
declare attribute aliases via @AliasFor
.AnnotationUtils.synthesizeAnnotation(A)
,
AnnotationUtils.synthesizeAnnotationArray(java.lang.annotation.Annotation[], java.lang.reflect.AnnotatedElement)
Constructor and Description |
---|
SynthesizingMethodParameter(Method method,
int parameterIndex)
Create a new
SynthesizingMethodParameter for the given method. |
Modifier and Type | Method and Description |
---|---|
protected <A extends Annotation> |
adaptAnnotation(A annotation)
A template method to post-process a given annotation instance before
returning it to the caller.
|
protected Annotation[] |
adaptAnnotationArray(Annotation[] annotations)
A template method to post-process a given annotation array before
returning it to the caller.
|
decreaseNestingLevel, equals, forMethodOrConstructor, getAnnotatedElement, getConstructor, getContainingClass, getDeclaringClass, getGenericParameterType, getMember, getMethod, getMethodAnnotation, getMethodAnnotations, getNestedGenericParameterType, getNestedParameterType, getNestingLevel, getParameterAnnotation, getParameterAnnotations, getParameterIndex, getParameterName, getParameterType, getTypeIndexForCurrentLevel, getTypeIndexForLevel, hashCode, hasParameterAnnotation, hasParameterAnnotations, increaseNestingLevel, initParameterNameDiscovery, setTypeIndexForCurrentLevel
public SynthesizingMethodParameter(Method method, int parameterIndex)
SynthesizingMethodParameter
for the given method.method
- the Method to specify a parameter forparameterIndex
- the index of the parameter: -1 for the method
return type; 0 for the first method parameter; 1 for the second method
parameter, etc.protected <A extends Annotation> A adaptAnnotation(A annotation)
MethodParameter
The default implementation simply returns the given annotation as-is.
adaptAnnotation
in class MethodParameter
annotation
- the annotation about to be returnedprotected Annotation[] adaptAnnotationArray(Annotation[] annotations)
MethodParameter
The default implementation simply returns the given annotation array as-is.
adaptAnnotationArray
in class MethodParameter
annotations
- the annotation array about to be returned