クラス SynthesizingMethodParameter

java.lang.ObjectSE
org.springframework.core.MethodParameter
org.springframework.core.annotation.SynthesizingMethodParameter
既知の直属サブクラス
AnnotatedMethod.AnnotatedMethodParameter

public class SynthesizingMethodParameter extends MethodParameter
@AliasFor を介して属性のエイリアスを宣言するアノテーションを合成する MethodParameter バリアント。
導入:
4.2
作成者:
Juergen Hoeller, Sam Brannen
関連事項:
  • コンストラクターの詳細

    • SynthesizingMethodParameter

      public SynthesizingMethodParameter(MethodSE method, int parameterIndex)
      ネストレベル 1 で、指定されたメソッドの新しい SynthesizingMethodParameter を作成します。
      パラメーター:
      method - パラメーターを指定するメソッド
      parameterIndex - パラメーターのインデックス: メソッドの戻り値の型の場合は -1。最初のメソッドパラメーターの場合は 0。2 番目のメソッドパラメーターなどの場合は 1
    • SynthesizingMethodParameter

      public SynthesizingMethodParameter(MethodSE method, int parameterIndex, int nestingLevel)
      指定されたメソッドの新しい SynthesizingMethodParameter を作成します。
      パラメーター:
      method - パラメーターを指定するメソッド
      parameterIndex - パラメーターのインデックス: メソッドの戻り値の型の場合は -1。最初のメソッドパラメーターの場合は 0。2 番目のメソッドパラメーターなどの場合は 1
      nestingLevel - ターゲット型のネストレベル (通常 1。たとえばリストのリストの場合、1 はネストされたリストを示し、2 はネストされたリストの要素を示します)
    • SynthesizingMethodParameter

      public SynthesizingMethodParameter(ConstructorSE<?> constructor, int parameterIndex)
      ネストレベル 1 で、指定したコンストラクターの新しい SynthesizingMethodParameter を作成します。
      パラメーター:
      constructor - パラメーターを指定するコンストラクター
      parameterIndex - パラメーターのインデックス
    • SynthesizingMethodParameter

      public SynthesizingMethodParameter(ConstructorSE<?> constructor, int parameterIndex, int nestingLevel)
      指定されたコンストラクターの新しい SynthesizingMethodParameter を作成します。
      パラメーター:
      constructor - パラメーターを指定するコンストラクター
      parameterIndex - パラメーターのインデックス
      nestingLevel - ターゲット型のネストレベル (通常 1。たとえばリストのリストの場合、1 はネストされたリストを示し、2 はネストされたリストの要素を示します)
    • SynthesizingMethodParameter

      protected SynthesizingMethodParameter(SynthesizingMethodParameter original)
      コピーコンストラクター。元のオブジェクトと同じメタデータとキャッシュ状態に基づいて、独立した SynthesizingMethodParameter を生成します。
      パラメーター:
      original - コピー元の SynthesizingMethodParameter オブジェクト
  • メソッドの詳細

    • adaptAnnotation

      protected <A extends AnnotationSE> A adaptAnnotation(A annotation)
      クラスからコピーされた説明: MethodParameter
      呼び出し元に返す前に特定のアノテーションインスタンスを後処理するテンプレートメソッド。

      デフォルトの実装は、指定されたアノテーションをそのまま返すだけです。

      オーバーライド:
      クラス MethodParameteradaptAnnotation 
      パラメーター:
      annotation - 返されるアノテーション
      戻り値:
      後処理されたアノテーション (または単に元のもの)
    • adaptAnnotationArray

      protected AnnotationSE[] adaptAnnotationArray(AnnotationSE[] annotations)
      クラスからコピーされた説明: MethodParameter
      呼び出し元に返す前に特定のアノテーション配列を後処理するテンプレートメソッド。

      デフォルトの実装は、指定されたアノテーション配列をそのまま返すだけです。

      オーバーライド:
      クラス MethodParameteradaptAnnotationArray 
      パラメーター:
      annotations - 返されようとしているアノテーション配列
      戻り値:
      後処理されたアノテーション配列 (または単に元のもの)
    • clone

      オーバーライド:
      クラス MethodParameterclone 
    • forExecutable

      public static SynthesizingMethodParameter forExecutable(ExecutableSE executable, int parameterIndex)
      指定されたメソッドまたはコンストラクターの新しい SynthesizingMethodParameter を作成します。

      これは、メソッドまたはコンストラクターの参照が一般的な方法で処理されるシナリオの便利なファクトリメソッドです。

      パラメーター:
      executable - パラメーターを指定するメソッドまたはコンストラクター
      parameterIndex - パラメーターのインデックス
      戻り値:
      対応する SynthesizingMethodParameter インスタンス
      導入:
      5.0
    • forParameter

      public static SynthesizingMethodParameter forParameter(ParameterSE parameter)
      指定されたパラメーター記述子の新しい SynthesizingMethodParameter を作成します。

      これは、Java 8 ParameterSE 記述子がすでに利用可能なシナリオの便利なファクトリメソッドです。

      パラメーター:
      parameter - パラメーター記述子
      戻り値:
      対応する SynthesizingMethodParameter インスタンス
      導入:
      5.0