public class SubclassProxyFactory extends Object implements ProxyFactory
ProxyFactory uses Mockito's jmock package to create proxies that
subclass from the target's class.| Modifier and Type | Field and Description |
|---|---|
private ProxyFactory |
fallbackProxyFactory
That proxy factory is used if this factory cannot be used.
|
| Constructor and Description |
|---|
SubclassProxyFactory() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
createProxy(Class<?> targetClass,
org.mockito.cglib.proxy.MethodInterceptor interceptor)
Create a proxy.
|
boolean |
isTypeMockable(Class<?> type) |
private ProxyFactory fallbackProxyFactory
public SubclassProxyFactory()
public <T> T createProxy(Class<?> targetClass, org.mockito.cglib.proxy.MethodInterceptor interceptor)
ProxyFactorycreateProxy in interface ProxyFactoryT - The type parameter makes some casts redundant.targetClass - the class the factory shall create a proxy forinterceptor - the method interceptor that shall be applied to all method
calls.public boolean isTypeMockable(Class<?> type)
Copyright © 2014. All rights reserved.