类 SynthesizingMethodParameter
java.lang.Object
cn.taketoday.core.MethodParameter
cn.taketoday.core.annotation.SynthesizingMethodParameter
- 所有已实现的接口:
AnnotatedElement
A
MethodParameter variant which synthesizes annotations that
declare attribute aliases via @AliasFor.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, Sam Brannen
- 另请参阅:
-
构造器概要
构造器限定符构造器说明protectedCopy constructor, resulting in an independentSynthesizingMethodParameterbased on the same metadata and cache state that the original object was in.SynthesizingMethodParameter(Constructor<?> constructor, int parameterIndex) Create a newSynthesizingMethodParameterfor the given constructor, with nesting level 1.SynthesizingMethodParameter(Constructor<?> constructor, int parameterIndex, int nestingLevel) Create a newSynthesizingMethodParameterfor the given constructor.SynthesizingMethodParameter(Method method, int parameterIndex) Create a newSynthesizingMethodParameterfor the given method, with nesting level 1.SynthesizingMethodParameter(Method method, int parameterIndex, int nestingLevel) Create a newSynthesizingMethodParameterfor the given method. -
方法概要
修饰符和类型方法说明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.clone()static SynthesizingMethodParameterforExecutable(Executable executable, int parameterIndex) Create a new SynthesizingMethodParameter for the given method or constructor.static SynthesizingMethodParameterforParameter(Parameter parameter) Create a new SynthesizingMethodParameter for the given parameter descriptor.从类继承的方法 cn.taketoday.core.MethodParameter
equals, forFieldAwareConstructor, getAnnotatedElement, getAnnotation, getAnnotations, getConstructor, getContainingClass, getDeclaredAnnotations, getDeclaringClass, getExecutable, getGenericParameterType, getMember, getMethod, getMethodAnnotation, getMethodAnnotations, getNestedGenericParameterType, getNestedParameterType, getNestingLevel, getParameter, getParameterAnnotation, getParameterAnnotations, getParameterIndex, getParameterName, getParameterType, getTypeIndexForCurrentLevel, getTypeIndexForLevel, hashCode, hasMethodAnnotation, hasParameterAnnotation, hasParameterAnnotations, initParameterNameDiscovery, isAnnotationPresent, isNullable, isOptional, nested, nested, nestedIfOptional, toString, withContainingClass, withTypeIndex从接口继承的方法 java.lang.reflect.AnnotatedElement
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
-
构造器详细资料
-
SynthesizingMethodParameter
Create a newSynthesizingMethodParameterfor 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
Create a newSynthesizingMethodParameterfor 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
Create a newSynthesizingMethodParameterfor 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 newSynthesizingMethodParameterfor 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
Copy constructor, resulting in an independentSynthesizingMethodParameterbased on the same metadata and cache state that the original object was in.- 参数:
original- the original SynthesizingMethodParameter object to copy from
-
-
方法详细资料
-
adaptAnnotation
从类复制的说明:MethodParameterA 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
从类复制的说明:MethodParameterA 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
- 覆盖:
clone在类中MethodParameter
-
forExecutable
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.
- 参数:
executable- the Method or Constructor to specify a parameter forparameterIndex- the index of the parameter- 返回:
- the corresponding SynthesizingMethodParameter instance
-
forParameter
Create a new SynthesizingMethodParameter for the given parameter descriptor.This is a convenience factory method for scenarios where a Java 8
Parameterdescriptor is already available.- 参数:
parameter- the parameter descriptor- 返回:
- the corresponding SynthesizingMethodParameter instance
-