MethodParameter variant which synthesizes annotations that
declare attribute aliases via @AliasFor.
AnnotationUtils#synthesizeAnnotation, AnnotationUtils#synthesizeAnnotationArray
| Access | Constructor and Description |
|---|---|
| public | SynthesizingMethodParameter(Method
the Method to specify a parameter for method, int the index of the parameter: -1 for the method
return type; 0 for the first method parameter; 1 for the second method
parameter, etc. parameterIndex)Create a new |
| public | SynthesizingMethodParameter(Method
the Method to specify a parameter for method, int the index of the parameter: -1 for the method
return type; 0 for the first method parameter; 1 for the second method
parameter, etc. parameterIndex, int 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) nestingLevel)Create a new |
| public | SynthesizingMethodParameter(Constructor<?>
the Constructor to specify a parameter for constructor, int the index of the parameter parameterIndex)Create a new |
| public | SynthesizingMethodParameter(Constructor<?>
the Constructor to specify a parameter for constructor, int the index of the parameter parameterIndex, int 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) nestingLevel)Create a new |
| protected | SynthesizingMethodParameter(SynthesizingMethodParameter
the original SynthesizingMethodParameter object to copy from original)Copy constructor, resulting in an independent |
| Modifier and Type | Method and Description |
|---|---|
| protected <A extends Annotation> A | adaptAnnotation(A
the annotation about to be returned annotation)Overrides org. A template method to post-process a given annotation instance before returning it to the caller. |
| protected Annotation[] | adaptAnnotationArray(Annotation[]
the annotation array about to be returned annotations)Overrides org. A template method to post-process a given annotation array before returning it to the caller. |
| public SynthesizingMethodParameter | clone()
Overrides org. Creates and returns a copy of this object. |
| public static SynthesizingMethodParameter | Returns: the corresponding SynthesizingMethodParameter instancethe Method or Constructor to specify a parameter for executable, int the index of the parameter parameterIndex)Hides org. Create a new SynthesizingMethodParameter for the given method or constructor. |
| public static SynthesizingMethodParameter | Returns: the corresponding SynthesizingMethodParameter instancethe parameter descriptor parameter)Hides org. Create a new SynthesizingMethodParameter for the given parameter descriptor. |
| SynthesizingMethodParameter | back to summary |
|---|---|
| public SynthesizingMethodParameter(Method method, int parameterIndex) Create a new
| |
| SynthesizingMethodParameter | back to summary |
|---|---|
| public SynthesizingMethodParameter(Method method, int parameterIndex, int nestingLevel) Create a new
| |
| SynthesizingMethodParameter | back to summary |
|---|---|
| public SynthesizingMethodParameter(Constructor<?> constructor, int parameterIndex) Create a new
| |
| SynthesizingMethodParameter | back to summary |
|---|---|
| public SynthesizingMethodParameter(Constructor<?> constructor, int parameterIndex, int nestingLevel) Create a new
| |
| SynthesizingMethodParameter | back to summary |
|---|---|
| protected SynthesizingMethodParameter(SynthesizingMethodParameter original) Copy constructor, resulting in an independent
| |
| adaptAnnotation | back to summary |
|---|---|
| protected <A extends Annotation> A adaptAnnotation(A annotation) Overrides org. Doc from org. A template method to post-process a given annotation instance before returning it to the caller. The default implementation simply returns the given annotation as-is.
| |
| adaptAnnotationArray | back to summary |
|---|---|
| protected Annotation[] adaptAnnotationArray(Annotation[] annotations) Overrides org. Doc from org. A template method to post-process a given annotation array before returning it to the caller. The default implementation simply returns the given annotation array as-is.
| |
| clone | back to summary |
|---|---|
| public SynthesizingMethodParameter clone() Overrides org. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| forExecutable | back to summary |
|---|---|
| public static SynthesizingMethodParameter forExecutable(Executable executable, int parameterIndex) Hides org. Create a new SynthesizingMethodParameter for the given method or constructor. This is a convenience factory method for scenarios where a Method or Constructor reference is treated in a generic fashion.
| |
| forParameter | back to summary |
|---|---|
| public static SynthesizingMethodParameter forParameter(Parameter parameter) Hides org. Create a new SynthesizingMethodParameter for the given parameter descriptor. This is a convenience factory method for scenarios where a
Java 8
| |