org.springframework.data.web

## Class JsonProjectingMethodInterceptorFactory

- java.lang.Object
- - org.springframework.data.web.JsonProjectingMethodInterceptorFactory

All Implemented Interfaces:
  MethodInterceptorFactory

    public class JsonProjectingMethodInterceptorFactory
    extends Object
    implements MethodInterceptorFactory

`MethodInterceptorFactory` to create a `MethodInterceptor` that will

Since:
  1.13
Author:
  Oliver Gierke, Mark Paluch

### Constructor Summary

Constructors
Constructor and Description
`JsonProjectingMethodInterceptorFactory(com.jayway.jsonpath.spi.mapper.MappingProvider mappingProvider)` Creates a new `JsonProjectingMethodInterceptorFactory` using the given `ObjectMapper`.

### Method Summary

All Methods Instance Methods Concrete Methods
`MethodInterceptor` `createMethodInterceptor(Object source, Class<?> targetType)` Returns the `MethodInterceptor` to be used for the given source object and target type.
`boolean` `supports(Object source, Class<?> targetType)` Returns whether the current factory is supposed to be used to create a `MethodInterceptor` for proxy of the given target type.

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

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

### Constructor Detail

#### JsonProjectingMethodInterceptorFactory

    public JsonProjectingMethodInterceptorFactory(com.jayway.jsonpath.spi.mapper.MappingProvider mappingProvider)

Creates a new `JsonProjectingMethodInterceptorFactory` using the given `ObjectMapper`.

Parameters:
  `mapper` - must not be null.

### Method Detail

#### createMethodInterceptor

    public MethodInterceptor createMethodInterceptor(Object source,
                                                     Class<?> targetType)

Description copied from interface: `MethodInterceptorFactory`
Returns the `MethodInterceptor` to be used for the given source object and target type.

Specified by:
  `createMethodInterceptor` in interface `MethodInterceptorFactory`
Parameters:
  `source` - will never be null.
  `targetType` - will never be null.
Returns:

#### supports

    public boolean supports(Object source,
                            Class<?> targetType)

Description copied from interface: `MethodInterceptorFactory`
Returns whether the current factory is supposed to be used to create a `MethodInterceptor` for proxy of the given target type.

Specified by:
  `supports` in interface `MethodInterceptorFactory`
Parameters:
  `source` - will never be null.
  `targetType` - will never be null.
Returns: