com.googlecode.catchexception.throwable.internal
Class ThrowableProcessingInterceptor<E extends Throwable>

java.lang.Object
  extended by com.googlecode.catchexception.throwable.internal.AbstractThrowableProcessingInvocationHandler<E>
      extended by com.googlecode.catchexception.throwable.internal.ThrowableProcessingInterceptor<E>
Type Parameters:
E - The type of the throwable that shall be caught and (optionally) verified
All Implemented Interfaces:
io.codearte.catchexception.shade.mockito.cglib.proxy.Callback, io.codearte.catchexception.shade.mockito.cglib.proxy.MethodInterceptor

public class ThrowableProcessingInterceptor<E extends Throwable>
extends AbstractThrowableProcessingInvocationHandler<E>
implements io.codearte.catchexception.shade.mockito.cglib.proxy.MethodInterceptor

This AbstractThrowableProcessingInvocationHandler implements MethodInterceptor for Mockito's cglib variant.

Author:
rwoo, federico.gaule at gmail.com

Field Summary
private  io.codearte.catchexception.shade.mockito.internal.creation.cglib.CGLIBHacker cglibHacker
          We use this object to change the naming policy that is used by MethodProxy.helper(io.codearte.catchexception.shade.mockito.cglib.proxy.MethodProxy.CreateInfo, java.lang.Class).
 
Fields inherited from class com.googlecode.catchexception.throwable.internal.AbstractThrowableProcessingInvocationHandler
assertThrowable, clazz, target
 
Constructor Summary
ThrowableProcessingInterceptor(Object target, Class<E> clazz, boolean assertThrowable)
           
 
Method Summary
 Object intercept(Object obj, Method method, Object[] args, io.codearte.catchexception.shade.mockito.cglib.proxy.MethodProxy proxy)
           
 
Methods inherited from class com.googlecode.catchexception.throwable.internal.AbstractThrowableProcessingInvocationHandler
afterInvocation, afterInvocationThrowsThrowable, beforeInvocation, safeReturnValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cglibHacker

private io.codearte.catchexception.shade.mockito.internal.creation.cglib.CGLIBHacker cglibHacker
We use this object to change the naming policy that is used by MethodProxy.helper(io.codearte.catchexception.shade.mockito.cglib.proxy.MethodProxy.CreateInfo, java.lang.Class). The new naming policy avoids duplicate class definitions.

Constructor Detail

ThrowableProcessingInterceptor

public ThrowableProcessingInterceptor(Object target,
                                      Class<E> clazz,
                                      boolean assertThrowable)
Method Detail

intercept

public Object intercept(Object obj,
                        Method method,
                        Object[] args,
                        io.codearte.catchexception.shade.mockito.cglib.proxy.MethodProxy proxy)
                 throws Throwable
Specified by:
intercept in interface io.codearte.catchexception.shade.mockito.cglib.proxy.MethodInterceptor
Throws:
Throwable


Copyright © 2015. All rights reserved.