com.googlecode.catchexception.throwable.internal
Class InterfaceOnlyProxyFactory

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

public class InterfaceOnlyProxyFactory
extends Object
implements ProxyFactory

This ProxyFactory create proxies that implements all interfaces of the underlying object including the marker interface InterfaceOnlyProxy. But in contrast to the proxies created by SubclassProxyFactory such a proxy does not subclass the class of the underlying object.

Author:
rwoo

Constructor Summary
InterfaceOnlyProxyFactory()
           
 
Method Summary
<T> T
createProxy(Class<?> targetClass, io.codearte.catchexception.shade.mockito.cglib.proxy.MethodInterceptor interceptor)
          Create a proxy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterfaceOnlyProxyFactory

public InterfaceOnlyProxyFactory()
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.


Copyright © 2015. All rights reserved.