com.taco.lang.reflect
Class SynchronizedProxyFactory
java.lang.Object
com.taco.lang.reflect.SynchronizedProxyFactory
public class SynchronizedProxyFactory
- extends java.lang.Object
A static utility class that creates synchronized implementations of
interfaces based on unsynchronized implementations.
Method Summary |
static java.lang.Object |
makeSynchronizedProxy(java.lang.Object obj,
java.lang.Class[] interfaces)
Create a synchronized proxy based on obj which implements
the intefaces classes in interfaces , in which all methods
are synchronized. |
static java.lang.Object |
makeSynchronizedProxy(java.lang.Object obj,
java.lang.Class[] interfaces,
java.util.Set unsynchronizedMethods)
Create a synchronized proxy based on obj which implements
the intefaces classes in interfaces , in which all methods
not in unsynchronizedMethods are synchronized. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SynchronizedProxyFactory
public SynchronizedProxyFactory()
makeSynchronizedProxy
public static final java.lang.Object makeSynchronizedProxy(java.lang.Object obj,
java.lang.Class[] interfaces)
- Create a synchronized proxy based on
obj
which implements
the intefaces classes in interfaces
, in which all methods
are synchronized.
makeSynchronizedProxy
public static final java.lang.Object makeSynchronizedProxy(java.lang.Object obj,
java.lang.Class[] interfaces,
java.util.Set unsynchronizedMethods)
- Create a synchronized proxy based on
obj
which implements
the intefaces classes in interfaces
, in which all methods
not in unsynchronizedMethods
are synchronized. The set
unsynchronizedMethods
is copied.