org.springframework.data.repository.core.support

## Class MethodInvocationValidator

- java.lang.Object
- - org.springframework.data.repository.core.support.MethodInvocationValidator

All Implemented Interfaces:
  Advice, Interceptor, MethodInterceptor

    public class MethodInvocationValidator
    extends Object
    implements 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
See Also:
  `Nonnull`, `ReflectionUtils.isNullable(MethodParameter)`, `NullableUtils`

### Constructor Summary

Constructors
Constructor and Description
`MethodInvocationValidator()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`Object` `invoke(MethodInvocation invocation)`
`static boolean` `supports(Class<?> repositoryInterface)` Returns true if the `repositoryInterface` is supported by this interceptor.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MethodInvocationValidator

    public MethodInvocationValidator()

### Method Detail

#### 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(MethodInvocation invocation)
                            throws Throwable

Specified by:
  `invoke` in interface `MethodInterceptor`
Throws:
  `Throwable`