com.googlecode.catchexception.throwable.internal
Class SubclassProxyFactory

java.lang.Object
  extended by com.googlecode.catchexception.throwable.internal.SubclassProxyFactory
All Implemented Interfaces:
ProxyFactory

public class SubclassProxyFactory
extends Object
implements ProxyFactory

This ProxyFactory uses Mockito's jmock package to create proxies that subclass from the target's class.

Author:
rwoo

Field Summary
private  ProxyFactory fallbackProxyFactory
          That proxy factory is used if this factory cannot be used.
 
Constructor Summary
SubclassProxyFactory()
           
 
Method Summary
<T> T
createProxy(Class<?> targetClass, io.codearte.catchexception.shade.mockito.cglib.proxy.MethodInterceptor interceptor)
          Create a proxy.
 boolean isTypeMockable(Class<?> type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fallbackProxyFactory

private ProxyFactory fallbackProxyFactory
That proxy factory is used if this factory cannot be used.

Constructor Detail

SubclassProxyFactory

public SubclassProxyFactory()
Method Detail

createProxy

public <T> T createProxy(Class<?> targetClass,
                         io.codearte.catchexception.shade.mockito.cglib.proxy.MethodInterceptor interceptor)
Description copied from interface: ProxyFactory
Create a proxy.

Specified by:
createProxy in interface ProxyFactory
Type Parameters:
T - The type parameter makes some casts redundant.
Parameters:
targetClass - the class the factory shall create a proxy for
interceptor - the method interceptor that shall be applied to all method calls.
Returns:
Returns the created proxy.

isTypeMockable

public boolean isTypeMockable(Class<?> type)


Copyright © 2015. All rights reserved.