public class ProxyProjectionFactory extends Object implements ProjectionFactory
ProjectionFactory
to create JDK proxies to back interfaces and handle method invocations on them. By
default two different kinds of methods are supported:
Value
to contain a SpEL expression, which will be evaluated on
invocation. The expressions can use target
to refer to the proxy target.Modifier and Type | Class and Description |
---|---|
static interface |
ProxyProjectionFactory.TargetClassAware
Extension of
TargetClassAware to be able to ignore the getter on JSON rendering. |
Constructor and Description |
---|
ProxyProjectionFactory(BeanFactory beanFactory)
Creates a new
ProxyProjectionFactory using the given BeanFactory . |
Modifier and Type | Method and Description |
---|---|
<T> T |
createProjection(Object source,
Class<T> projectionType)
Creates a projection of the given type for the given source object.
|
public ProxyProjectionFactory(BeanFactory beanFactory)
ProxyProjectionFactory
using the given BeanFactory
.beanFactory
- can be null. If null, SpEL expressions at projection interfaces cannot use
bean references.public <T> T createProjection(Object source, Class<T> projectionType)
ProjectionFactory
createProjection
in interface ProjectionFactory
source
- the object to create a projection for, can be nullprojectionType
- the type to create.Copyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.