T
- the type of interface being wrappedpublic class ProxyAutoBean<T> extends AbstractAutoBean<T>
AbstractAutoBean.OneShotContext
AutoBean.PropertyName
data, EMPTY_OBJECT, UNSPLITTABLE_VALUES_KEY, wrapped
Constructor and Description |
---|
ProxyAutoBean(AutoBeanFactory factory,
Class<?> beanType,
Configuration configuration) |
ProxyAutoBean(AutoBeanFactory factory,
Class<?> beanType,
Configuration configuration,
T toWrap) |
Modifier and Type | Method and Description |
---|---|
T |
as()
Returns a proxy implementation of the
T interface which will
delegate to the underlying wrapped object, if any. |
protected void |
call(String method,
Object returned,
Object... parameters)
Allow access by
ShimHandler . |
protected void |
checkFrozen()
Allow access by
ShimHandler . |
protected void |
checkWrapped()
Allow access by
ShimHandler . |
protected T |
createSimplePeer()
Not used in this implementation.
|
protected <V> V |
get(String method,
V toReturn)
Allow access by
ShimHandler . |
Configuration |
getConfiguration() |
protected <V> V |
getOrReify(String propertyName)
Allow access by BeanMethod.
|
Class<T> |
getType()
Returns the wrapped interface type.
|
protected T |
getWrapped()
Allow access by
ShimHandler . |
static <T> T |
makeProxy(Class<T> intf,
InvocationHandler handler,
Class<?>... extraInterfaces)
Utility method to crete a new
Proxy instance. |
protected void |
set(String method,
Object value)
Allow access by
ShimHandler . |
protected void |
setProperty(String propertyName,
Object value) |
protected void |
traverseProperties(AutoBeanVisitor visitor,
AbstractAutoBean.OneShotContext ctx) |
accept, clone, getFactory, getFromWrapper, getSplittable, getTag, hasUnsplittableValues, isFrozen, isUsingSimplePeer, isWrapped, isWrapper, setData, setFrozen, setTag, traverse, unwrap
public ProxyAutoBean(AutoBeanFactory factory, Class<?> beanType, Configuration configuration)
public ProxyAutoBean(AutoBeanFactory factory, Class<?> beanType, Configuration configuration, T toWrap)
public static <T> T makeProxy(Class<T> intf, InvocationHandler handler, Class<?>... extraInterfaces)
Proxy
instance.T
- the interface type to be implemented by the Proxyintf
- the Class representing the interface typehandler
- the implementation of the interfaceextraInterfaces
- additional interface types the Proxy should
implementpublic T as()
AutoBean
T
interface which will
delegate to the underlying wrapped object, if any.public Configuration getConfiguration()
public Class<T> getType()
AutoBean
protected void call(String method, Object returned, Object... parameters)
ShimHandler
.call
in class AbstractAutoBean<T>
method
- the method namereturned
- the returned objectparameters
- the parameter listprotected void checkFrozen()
ShimHandler
.checkFrozen
in class AbstractAutoBean<T>
protected void checkWrapped()
ShimHandler
.checkWrapped
in class AbstractAutoBean<T>
protected T createSimplePeer()
getWrapped()
.createSimplePeer
in class AbstractAutoBean<T>
protected <V> V get(String method, V toReturn)
ShimHandler
.get
in class AbstractAutoBean<T>
method
- the method nametoReturn
- the value to returnprotected <V> V getOrReify(String propertyName)
getOrReify
in class AbstractAutoBean<T>
protected T getWrapped()
ShimHandler
.getWrapped
in class AbstractAutoBean<T>
protected void set(String method, Object value)
ShimHandler
.set
in class AbstractAutoBean<T>
method
- the method namevalue
- the Object value to be setprotected void setProperty(String propertyName, Object value)
setProperty
in class AbstractAutoBean<T>
protected void traverseProperties(AutoBeanVisitor visitor, AbstractAutoBean.OneShotContext ctx)
traverseProperties
in class AbstractAutoBean<T>
Copyright © 2016. All rights reserved.