public class ProxyFactory extends Object
| Constructor and Description |
|---|
ProxyFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected static <T> Class<T> |
createEnhancedClass(Class<T> proxiedClass,
Class<?>... implementedInterfaces) |
static <T> T |
createInitializedOrUninitializedInstanceOfType(Class<T> clazz)
Creates an instance of the given type.
|
protected static <T> T |
createProxy(String mockName,
boolean initialize,
ProxyInvocationHandler invocationHandler,
Class<T> proxiedClass,
Class<?>... implementedInterfaces)
Creates a proxy object for the given type.
|
static <T> T |
createProxy(String mockName,
ProxyInvocationHandler invocationHandler,
Class<T> proxiedClass,
Class<?>... implementedInterfaces)
Creates a proxy object for the given type.
|
static <T> T |
createUninitializedInstanceOfType(Class<T> clazz)
Creates an instance of the given type.
|
static <T> T |
createUninitializedProxy(String mockName,
ProxyInvocationHandler invocationHandler,
Class<T> proxiedClass,
Class<?>... implementedInterfaces)
Creates a proxy object for the given type.
|
public static <T> T createProxy(String mockName, ProxyInvocationHandler invocationHandler, Class<T> proxiedClass, Class<?>... implementedInterfaces)
mockName - The name of the mock, not nullinvocationHandler - The handler that will handle the method invocations of the proxy, not null.proxiedClass - The type to proxy, not nullimplementedInterfaces - Additional interfaces that the proxy must implementpublic static <T> T createUninitializedProxy(String mockName, ProxyInvocationHandler invocationHandler, Class<T> proxiedClass, Class<?>... implementedInterfaces)
mockName - The name of the mock, not nullinvocationHandler - The handler that will handle the method invocations of the proxy, not null.proxiedClass - The type to proxy, not nullimplementedInterfaces - Additional interfaces that the proxy must implementprotected static <T> T createProxy(String mockName, boolean initialize, ProxyInvocationHandler invocationHandler, Class<T> proxiedClass, Class<?>... implementedInterfaces)
mockName - The name of the mock, not nullinitialize - If possible, use the default constructor and initialize all fieldsimplementedInterfaces - Additional interfaces that the proxy must implementproxiedClass - The type to proxy, not nullinvocationHandler - The handler that will handle the method invocations of the proxy, not null.public static <T> T createInitializedOrUninitializedInstanceOfType(Class<T> clazz)
T - The type of the instanceclazz - The class for which an instance is requestedpublic static <T> T createUninitializedInstanceOfType(Class<T> clazz)
T - The type of the instanceclazz - The class for which an instance is requestedCopyright © 2016. All Rights Reserved.