org.springframework.data.projection

## Class DefaultMethodInvokingMethodInterceptor

- java.lang.Object
- - org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor

All Implemented Interfaces:
  Advice, Interceptor, MethodInterceptor

    public class DefaultMethodInvokingMethodInterceptor
    extends Object
    implements MethodInterceptor

Method interceptor to invoke default methods on the repository proxy.

Author:
  Oliver Gierke, Jens Schauder, Mark Paluch

### Constructor Summary

Constructors
Constructor and Description
`DefaultMethodInvokingMethodInterceptor()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static boolean` `hasDefaultMethods(Class<?> interfaceClass)` Returns whether the `interfaceClass` declares `default methods`.
`Object` `invoke(MethodInvocation invocation)`

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

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

### Constructor Detail

#### DefaultMethodInvokingMethodInterceptor

    public DefaultMethodInvokingMethodInterceptor()

### Method Detail

#### hasDefaultMethods

    public static boolean hasDefaultMethods(Class<?> interfaceClass)

Returns whether the `interfaceClass` declares `default methods`.

Parameters:
  `interfaceClass` - the `Class` to inspect.
Returns:
  true if `interfaceClass` declares a default method.
Since:
  2.2

#### invoke

    @Nullable
    public Object invoke(MethodInvocation invocation)
                            throws Throwable

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