public class SynthesizingMethodParameter extends MethodParameter
@AliasFor
を介して属性のエイリアスを宣言するアノテーションを合成する MethodParameter
バリアント。AnnotationUtils.synthesizeAnnotation(A)
, AnnotationUtils.synthesizeAnnotationArray(java.lang.annotation.Annotation[], java.lang.Object)
修飾子 | コンストラクターと説明 |
---|---|
| SynthesizingMethodParameter(ConstructorSE<?> constructor, int parameterIndex) ネストレベル 1 で、指定したコンストラクターの新しい SynthesizingMethodParameter を作成します。 |
| SynthesizingMethodParameter(ConstructorSE<?> constructor, int parameterIndex, int nestingLevel) 指定されたコンストラクターの新しい SynthesizingMethodParameter を作成します。 |
| SynthesizingMethodParameter(MethodSE method, int parameterIndex) ネストレベル 1 で、指定されたメソッドの新しい SynthesizingMethodParameter を作成します。 |
| SynthesizingMethodParameter(MethodSE method, int parameterIndex, int nestingLevel) 指定されたメソッドの新しい SynthesizingMethodParameter を作成します。 |
protected | SynthesizingMethodParameter(SynthesizingMethodParameter original) コピーコンストラクター。元のオブジェクトと同じメタデータとキャッシュ状態に基づいて、独立した SynthesizingMethodParameter を生成します。 |
修飾子と型 | メソッドと説明 |
---|---|
protected <A extends AnnotationSE> | adaptAnnotation(A annotation) 呼び出し元に返す前に特定のアノテーションインスタンスを後処理するテンプレートメソッド。 |
protected AnnotationSE[] | adaptAnnotationArray(AnnotationSE[] annotations) 呼び出し元に返す前に特定のアノテーション配列を後処理するテンプレートメソッド。 |
SynthesizingMethodParameter | clone() |
static SynthesizingMethodParameter | forExecutable(ExecutableSE executable, int parameterIndex) 指定されたメソッドまたはコンストラクターの新しい SynthesizingMethodParameter を作成します。 |
static SynthesizingMethodParameter | forParameter(ParameterSE parameter) 指定されたパラメーター記述子の新しい SynthesizingMethodParameter を作成します。 |
decreaseNestingLevel, equals, findParameterIndex, forMethodOrConstructor, getAnnotatedElement, getConstructor, getContainingClass, getDeclaringClass, getExecutable, getGenericParameterType, getMember, getMethod, getMethodAnnotation, getMethodAnnotations, getNestedGenericParameterType, getNestedParameterType, getNestingLevel, getParameter, getParameterAnnotation, getParameterAnnotations, getParameterIndex, getParameterName, getParameterType, getTypeIndexForCurrentLevel, getTypeIndexForLevel, hashCode, hasMethodAnnotation, hasParameterAnnotation, hasParameterAnnotations, increaseNestingLevel, initParameterNameDiscovery, isOptional, nested, nestedIfOptional, setTypeIndexForCurrentLevel, toString
finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public SynthesizingMethodParameter(MethodSE method, int parameterIndex)
SynthesizingMethodParameter
を作成します。method
- パラメーターを指定するメソッド parameterIndex
- パラメーターのインデックス: メソッドの戻り値の型の場合は -1。最初のメソッドパラメーターの場合は 0。2 番目のメソッドパラメーターなどの場合は 1public SynthesizingMethodParameter(MethodSE method, int parameterIndex, int nestingLevel)
SynthesizingMethodParameter
を作成します。method
- パラメーターを指定するメソッド parameterIndex
- パラメーターのインデックス: メソッドの戻り値の型の場合は -1。最初のメソッドパラメーターの場合は 0。2 番目のメソッドパラメーターなどの場合は 1nestingLevel
- ターゲット型のネストレベル (通常 1。たとえばリストのリストの場合、1 はネストされたリストを示し、2 はネストされたリストの要素を示します)public SynthesizingMethodParameter(ConstructorSE<?> constructor, int parameterIndex)
SynthesizingMethodParameter
を作成します。constructor
- パラメーターを指定するコンストラクター parameterIndex
- パラメーターのインデックス public SynthesizingMethodParameter(ConstructorSE<?> constructor, int parameterIndex, int nestingLevel)
SynthesizingMethodParameter
を作成します。constructor
- パラメーターを指定するコンストラクター parameterIndex
- パラメーターのインデックス nestingLevel
- ターゲット型のネストレベル (通常 1。たとえばリストのリストの場合、1 はネストされたリストを示し、2 はネストされたリストの要素を示します)protected SynthesizingMethodParameter(SynthesizingMethodParameter original)
SynthesizingMethodParameter
を生成します。original
- コピー元の SynthesizingMethodParameter オブジェクト protected <A extends AnnotationSE> A adaptAnnotation(A annotation)
MethodParameter
デフォルトの実装は、指定されたアノテーションをそのまま返すだけです。
MethodParameter
の adaptAnnotation
annotation
- 返されるアノテーション protected AnnotationSE[] adaptAnnotationArray(AnnotationSE[] annotations)
MethodParameter
デフォルトの実装は、指定されたアノテーション配列をそのまま返すだけです。
MethodParameter
の adaptAnnotationArray
annotations
- 返されようとしているアノテーション配列 public SynthesizingMethodParameter clone()
MethodParameter
の clone
public static SynthesizingMethodParameter forExecutable(ExecutableSE executable, int parameterIndex)
これは、メソッドまたはコンストラクターの参照が一般的な方法で処理されるシナリオの便利なファクトリメソッドです。
executable
- パラメーターを指定するメソッドまたはコンストラクター parameterIndex
- パラメーターのインデックス public static SynthesizingMethodParameter forParameter(ParameterSE parameter)
これは、Java 8 Parameter
SE 記述子がすでに利用可能なシナリオの便利なファクトリメソッドです。
parameter
- パラメーター記述子