クラス NullnessMethodInvocationValidator

java.lang.ObjectSE
org.springframework.data.util.NullnessMethodInvocationValidator
実装されたすべてのインターフェース:
AdviceInterceptorMethodInterceptor
既知の直属サブクラス
MethodInvocationValidator

public class NullnessMethodInvocationValidator extends ObjectSE implements MethodInterceptor
リポジトリクエリメソッドで宣言された必須の戻り値とメソッドパラメーター制約を適用するインターセプター。Kotlin null 性マーカーと JSR-305 非 null アノテーションをサポートします。元々は MethodInvocationValidator を介して実装されていました。
導入:
3.5
作成者:
Mark Paluch, Johannes Englmeier, Christoph Strobl
関連事項:
  • コンストラクターの詳細

    • NullnessMethodInvocationValidator

      public NullnessMethodInvocationValidator()
  • メソッドの詳細

    • supports

      public static boolean supports(ClassSE<?> type)
      type がこのインターセプターでサポートされている場合は true を返します。
      パラメーター:
      type - インターフェースクラス。
      戻り値:
      type がこのインターセプターでサポートされている場合は true。
    • invoke

      @Nullable public ObjectSE invoke(MethodInvocation invocation) throws ThrowableSE
      次で指定:
      インターフェース MethodInterceptorinvoke 
      例外:
      ThrowableSE
    • argumentIsNull

      protected RuntimeExceptionSE argumentIsNull(MethodSE method, StringSE parameterName)
      メソッドパラメーターに null 以外の値を指定できなかったことを示す RuntimeExceptionSE を構築するテンプレートメソッド。
      パラメーター:
      method -
      parameterName -
      戻り値:
    • returnValueIsNull

      protected RuntimeExceptionSE returnValueIsNull(MethodSE method)
      null 以外の戻り値を返せなかったことを示す RuntimeExceptionSE を構築するためのテンプレートメソッド。
      パラメーター:
      method -
      戻り値: