モジュール spring.retry

クラス MethodInvokerUtils

java.lang.ObjectSE
org.springframework.classify.util.MethodInvokerUtils

public class MethodInvokerUtils extends ObjectSE
MethodInvoker インスタンスを作成するためのユーティリティメソッド。
導入:
1.1
作成者:
Lucas Ward, Artem Bilan
  • コンストラクターの詳細

    • MethodInvokerUtils

      public MethodInvokerUtils()
  • 方法の詳細

    • getMethodInvokerByName

      public static MethodInvoker getMethodInvokerByName(ObjectSE object, StringSE methodName, boolean paramsRequired, ClassSE<?>... paramTypes)
      提供されたメソッド名を使用して MethodInvoker を作成して検索します。
      パラメーター:
      object - 呼び出される
      methodName - 呼び出されるメソッド
      paramsRequired - パラメーターが必要かどうかを示すブール値。false の場合、メソッドの引数なしバージョンが検索されます。
      paramTypes - - 検索するメソッドのパラメーター型。
      戻り値:
      メソッドが見つかった場合は MethodInvoker、見つからなかった場合は null。
    • getParamTypesString

      public static StringSE getParamTypesString(ClassSE<?>... paramTypes)
      パラメーター型の配列の文字列表現を作成します。
      パラメーター:
      paramTypes - パラメーターの種類
      戻り値:
      paramTypes の文字列表現
    • getMethodInvokerForInterface

      public static MethodInvoker getMethodInvokerForInterface(ClassSE<?> cls, StringSE methodName, ObjectSE object, ClassSE<?>... paramTypes)
      提供されたインターフェースとそのインターフェースからのメソッド名を使用して MethodInvoker を作成します。
      パラメーター:
      cls - 名前の付いたメソッドを検索するためのインターフェース
      methodName - 呼び出されるメソッド
      object - 呼び出される
      paramTypes - - 検索するメソッドのパラメーター型。
      戻り値:
      メソッドが見つかった場合は MethodInvoker、見つからなかった場合は null。
    • getMethodInvokerByAnnotation

      public static MethodInvoker getMethodInvokerByAnnotation(ClassSE<? extends AnnotationSE> annotationType, ObjectSE target, ClassSE<?>... expectedParamTypes)
      annotationType に基づいてデリゲートから MethodInvoker を作成します。アノテーションが付けられたメソッドに有効なパラメーターセットがあることを確認します。
      パラメーター:
      annotationType - スキャンするアノテーション
      target - ターゲットオブジェクト
      expectedParamTypes - メソッドに期待されるパラメーター型
      戻り値:
      MethodInvoker
    • getMethodInvokerByAnnotation

      public static MethodInvoker getMethodInvokerByAnnotation(ClassSE<? extends AnnotationSE> annotationType, ObjectSE target)
      提供されたオブジェクトに提供されたアノテーションを使用して、メソッドの MethodInvoker を作成します。メソッドに適用できないアノテーション(つまり、METHOD の要素型でアノテーションが付けられていないアノテーション)は、例外がスローされる原因になります。
      パラメーター:
      annotationType - 検索される
      target - 呼び出される
      戻り値:
      提供されたアノテーションの MethodInvoker。何も見つからない場合は null。
    • getMethodInvokerForSingleArgument

      public static <C, T> MethodInvoker getMethodInvokerForSingleArgument(ObjectSE target)
      単一の public メソッドからデリゲートの MethodInvoker を作成します。
      型パラメーター:
      T - t
      C - C
      パラメーター:
      target - 適切な方法を検索するためのオブジェクト
      戻り値:
      デリゲートのメソッドを呼び出す MethodInvoker