public final class ProxyUtil extends Object
setProxyClassRetriever(ProxyClassRetriever)
in order to
correctly unproxy objects. If this method is not passed a non-null instance then methods here will behave as though no proxies
are being used. This can be done in Spring as follows:
<bean class="net.proteusframework.core.ProxyUtil" factory-method="getInstance" singleton="true"> <property name="proxyClassRetriever"> <bean class="com.i2rd.hibernate.HibernateProxyClassRetriever" factory-method="getInstance" singleton="true /"> </property> </bean>
Modifier and Type | Method and Description |
---|---|
static ProxyUtil |
getInstance()
Get an instance.
|
<O> Class<? extends O> |
getProxiedClass(O instance)
Get the class that is being proxied.
|
void |
setProxyClassRetriever(com.i2rd.util.ProxyClassRetriever proxyClassRetriever)
Sets the proxy class retriever.
|
public static ProxyUtil getInstance()
public <O> Class<? extends O> getProxiedClass(O instance)
O
- the type.instance
- the instance to check.public void setProxyClassRetriever(com.i2rd.util.ProxyClassRetriever proxyClassRetriever)
proxyClassRetriever
- the proxy class retriever to use