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.Object)| Modifier | Constructor and Description |
|---|---|
|
SynthesizingMethodParameter(Constructor<?> constructor,
int parameterIndex)
Create a new
SynthesizingMethodParameter for the given constructor,
with nesting level 1. |
|
SynthesizingMethodParameter(Constructor<?> constructor,
int parameterIndex,
int nestingLevel)
Create a new
SynthesizingMethodParameter for the given constructor. |
|
SynthesizingMethodParameter(Method method,
int parameterIndex)
Create a new
SynthesizingMethodParameter for the given method,
with nesting level 1. |
|
SynthesizingMethodParameter(Method method,
int parameterIndex,
int nestingLevel)
Create a new
SynthesizingMethodParameter for the given method. |
protected |
SynthesizingMethodParameter(SynthesizingMethodParameter original)
Copy constructor, resulting in an independent
SynthesizingMethodParameter
based on the same metadata and cache state that the original object was in. |
| 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.
|
SynthesizingMethodParameter |
clone() |
decreaseNestingLevel, equals, forMethodOrConstructor, getAnnotatedElement, getConstructor, getContainingClass, getDeclaringClass, getGenericParameterType, getMember, getMethod, getMethodAnnotation, getMethodAnnotations, getNestedGenericParameterType, getNestedParameterType, getNestingLevel, getParameterAnnotation, getParameterAnnotations, getParameterIndex, getParameterName, getParameterType, getTypeIndexForCurrentLevel, getTypeIndexForLevel, hashCode, hasMethodAnnotation, hasParameterAnnotation, hasParameterAnnotations, increaseNestingLevel, initParameterNameDiscovery, isOptional, nested, nestedIfOptional, setTypeIndexForCurrentLevel, toStringpublic SynthesizingMethodParameter(Method method, int parameterIndex)
SynthesizingMethodParameter for the given method,
with nesting level 1.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.public SynthesizingMethodParameter(Method method, int parameterIndex, int nestingLevel)
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.nestingLevel - the nesting level of the target type
(typically 1; e.g. in case of a List of Lists, 1 would indicate the
nested List, whereas 2 would indicate the element of the nested List)public SynthesizingMethodParameter(Constructor<?> constructor, int parameterIndex)
SynthesizingMethodParameter for the given constructor,
with nesting level 1.constructor - the Constructor to specify a parameter forparameterIndex - the index of the parameterpublic SynthesizingMethodParameter(Constructor<?> constructor, int parameterIndex, int nestingLevel)
SynthesizingMethodParameter for the given constructor.constructor - the Constructor to specify a parameter forparameterIndex - the index of the parameternestingLevel - the nesting level of the target type
(typically 1; e.g. in case of a List of Lists, 1 would indicate the
nested List, whereas 2 would indicate the element of the nested List)protected SynthesizingMethodParameter(SynthesizingMethodParameter original)
SynthesizingMethodParameter
based on the same metadata and cache state that the original object was in.original - the original SynthesizingMethodParameter object to copy fromprotected <A extends Annotation> A adaptAnnotation(A annotation)
MethodParameterThe default implementation simply returns the given annotation as-is.
adaptAnnotation in class MethodParameterannotation - the annotation about to be returnedprotected Annotation[] adaptAnnotationArray(Annotation[] annotations)
MethodParameterThe default implementation simply returns the given annotation array as-is.
adaptAnnotationArray in class MethodParameterannotations - the annotation array about to be returnedpublic SynthesizingMethodParameter clone()
clone in class MethodParameter