Class MethodInvocationValidator

java.lang.Object
org.springframework.data.repository.core.support.MethodInvocationValidator
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class MethodInvocationValidator extends Object implements org.aopalliance.intercept.MethodInterceptor
Interceptor enforcing required return value and method parameter constraints declared on repository query methods. Supports Kotlin nullability markers and JSR-305 Non-null annotations.
Since:
2.0
Author:
Mark Paluch, Johannes Englmeier
See Also:
  • Constructor Details

    • MethodInvocationValidator

      public MethodInvocationValidator()
  • Method Details

    • supports

      public static boolean supports(Class<?> repositoryInterface)
      Returns true if the repositoryInterface is supported by this interceptor.
      Parameters:
      repositoryInterface - the interface class.
      Returns:
      true if the repositoryInterface is supported by this interceptor.
    • invoke

      @Nullable public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
      Specified by:
      invoke in interface org.aopalliance.intercept.MethodInterceptor
      Throws:
      Throwable