|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.triactive.jdo.util.ProxyFactory
A high-performance factory for dynamic proxy objects.
A ProxyFactory performs the same function as java.lang.reflect.Proxy.newProxyInstance(), but does so for a single set of interfaces. It holds a (soft) reference to the proxy class constructor and so can create many proxies of the same type with very little overhead.
The generated proxy class is assigned the same class loader as the ProxyFactory class itself.
Constructor Summary | |
ProxyFactory(java.lang.Class intfc)
Creates a factory for proxy objects that implement the specified interface. |
|
ProxyFactory(java.lang.Class[] interfaces)
Creates a factory for proxy objects that implement the specified interface(s). |
Method Summary | |
java.lang.Object |
newInstance(java.lang.reflect.InvocationHandler handler)
Returns an instance of a proxy class for this factory's interfaces that dispatches method invocations to the specified invocation handler. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProxyFactory(java.lang.Class intfc)
intfc
- the interface for the proxy class to implementpublic ProxyFactory(java.lang.Class[] interfaces)
interfaces
- the list of interfaces for the proxy class to implementMethod Detail |
public java.lang.Object newInstance(java.lang.reflect.InvocationHandler handler)
handler
- the invocation handler to dispatch method invocations to
java.lang.IllegalArgumentException
- if any of the restrictions on the parameters that may be passed to
getProxyClass are violated
java.lang.NullPointerException
- if the invocation handler is null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |