public class Helpers
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
createProxy(java.lang.Class<T> cls,
java.util.Collection<MethodCallListener> listeners)
Creates a transparent proxy instance for the given class.
|
static <T> T |
createProxy(java.lang.Class<T> cls,
MethodCallListener listener)
Creates a transparent proxy instance for the given class.
|
static <T> T |
createProxy(java.lang.Class<T> cls,
java.lang.Object[] constructorArgs,
java.lang.Class<?>[] constructorArgTypes,
java.util.Collection<MethodCallListener> listeners)
Creates a transparent proxy instance for the given class.
|
static <T> T |
createProxy(java.lang.Class<T> cls,
java.lang.Object[] constructorArgs,
java.lang.Class<?>[] constructorArgTypes,
MethodCallListener listener)
Creates a transparent proxy instance for the given class.
|
public static <T> T createProxy(java.lang.Class<T> cls, java.lang.Object[] constructorArgs, java.lang.Class<?>[] constructorArgTypes, java.util.Collection<MethodCallListener> listeners)
NotImplementedException
.T
- Any class derived from Objectcls
- the class to which the proxy should be created.
Must not be an interface.constructorArgs
- Array of constructor arguments. Could be an
empty array if the class provides a constructor without arguments.constructorArgTypes
- Array of constructor argument types. Must
represent types of constructorArgs.listeners
- One or more method invocation listeners.public static <T> T createProxy(java.lang.Class<T> cls, java.util.Collection<MethodCallListener> listeners)
T
- Any class derived from Objectcls
- the class to which the proxy should be created.
Must not be an interface. Must expose a constructor
without arguments.listeners
- One or more method invocation listeners.public static <T> T createProxy(java.lang.Class<T> cls, MethodCallListener listener)
T
- Any class derived from Objectcls
- the class to which the proxy should be created.
Must not be an interface. Must expose a constructor
without arguments.listener
- Method invocation listener.public static <T> T createProxy(java.lang.Class<T> cls, java.lang.Object[] constructorArgs, java.lang.Class<?>[] constructorArgTypes, MethodCallListener listener)
T
- Any class derived from Objectcls
- the class to which the proxy should be created.
Must not be an interface.constructorArgs
- Array of constructor arguments. Could be an
empty array if the class provides a constructor without arguments.constructorArgTypes
- Array of constructor argument types. Must
represent types of constructorArgs.listener
- Method invocation listener.