类 SynthesizingMethodParameter
- java.lang.Object
- org.springframework.core.MethodParameter
- org.springframework.core.annotation.SynthesizingMethodParameter
public class SynthesizingMethodParameter extends MethodParameter
AMethodParameter
variant which synthesizes annotations that declare attribute aliases via@AliasFor
.- 从以下版本开始:
- 4.2
- 作者:
- Juergen Hoeller, Sam Brannen
- 另请参阅:
AnnotationUtils.synthesizeAnnotation(A)
,AnnotationUtils.synthesizeAnnotationArray(java.lang.annotation.Annotation[], java.lang.Object)
构造器概要
构造器 限定符 构造器 说明 SynthesizingMethodParameter(Constructor<?> constructor, int parameterIndex)
Create a newSynthesizingMethodParameter
for the given constructor, with nesting level 1.SynthesizingMethodParameter(Constructor<?> constructor, int parameterIndex, int nestingLevel)
Create a newSynthesizingMethodParameter
for the given constructor.SynthesizingMethodParameter(Method method, int parameterIndex)
Create a newSynthesizingMethodParameter
for the given method, with nesting level 1.SynthesizingMethodParameter(Method method, int parameterIndex, int nestingLevel)
Create a newSynthesizingMethodParameter
for the given method.protected
SynthesizingMethodParameter(SynthesizingMethodParameter original)
Copy constructor, resulting in an independentSynthesizingMethodParameter
based on the same metadata and cache state that the original object was in.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected <A extends Annotation>
AadaptAnnotation(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()
从类继承的方法 org.springframework.core.MethodParameter
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, toString
构造器详细资料
SynthesizingMethodParameter
public SynthesizingMethodParameter(Method method, int parameterIndex)
Create a newSynthesizingMethodParameter
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.
SynthesizingMethodParameter
public SynthesizingMethodParameter(Method method, int parameterIndex, int nestingLevel)
Create a newSynthesizingMethodParameter
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)
SynthesizingMethodParameter
public SynthesizingMethodParameter(Constructor<?> constructor, int parameterIndex)
Create a newSynthesizingMethodParameter
for the given constructor, with nesting level 1.- 参数:
constructor
- the Constructor to specify a parameter forparameterIndex
- the index of the parameter
SynthesizingMethodParameter
public SynthesizingMethodParameter(Constructor<?> constructor, int parameterIndex, int nestingLevel)
Create a newSynthesizingMethodParameter
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)
SynthesizingMethodParameter
protected SynthesizingMethodParameter(SynthesizingMethodParameter original)
Copy constructor, resulting in an independentSynthesizingMethodParameter
based on the same metadata and cache state that the original object was in.- 参数:
original
- the original SynthesizingMethodParameter object to copy from
方法详细资料
adaptAnnotation
protected <A extends Annotation> A adaptAnnotation(A annotation)
从类复制的说明:MethodParameter
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.
- 覆盖:
adaptAnnotation
在类中MethodParameter
- 参数:
annotation
- the annotation about to be returned- 返回:
- the post-processed annotation (or simply the original one)
adaptAnnotationArray
protected Annotation[] adaptAnnotationArray(Annotation[] annotations)
从类复制的说明:MethodParameter
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.
- 覆盖:
adaptAnnotationArray
在类中MethodParameter
- 参数:
annotations
- the annotation array about to be returned- 返回:
- the post-processed annotation array (or simply the original one)
clone
public SynthesizingMethodParameter clone()
- 覆盖:
clone
在类中MethodParameter