org.unitils.mock.core.proxy
Class CglibProxyMethodInterceptor.CglibProxyInvocation
java.lang.Object
org.unitils.mock.core.proxy.ProxyInvocation
org.unitils.mock.core.proxy.CglibProxyMethodInterceptor.CglibProxyInvocation
- Enclosing class:
- CglibProxyMethodInterceptor<T>
public static class CglibProxyMethodInterceptor.CglibProxyInvocation
- extends ProxyInvocation
An invocation implementation that uses the cglib method proxy to be able to invoke the original behavior.
|
Constructor Summary |
CglibProxyMethodInterceptor.CglibProxyInvocation(java.lang.String mockName,
java.lang.reflect.Method method,
java.util.List<java.lang.Object> arguments,
java.lang.StackTraceElement[] invokedAt,
java.lang.Object proxy,
net.sf.cglib.proxy.MethodProxy methodProxy)
Creates an invocation. |
|
Method Summary |
java.lang.Object |
invokeOriginalBehavior()
Invokes the original behavior by calling the method proxy. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CglibProxyMethodInterceptor.CglibProxyInvocation
public CglibProxyMethodInterceptor.CglibProxyInvocation(java.lang.String mockName,
java.lang.reflect.Method method,
java.util.List<java.lang.Object> arguments,
java.lang.StackTraceElement[] invokedAt,
java.lang.Object proxy,
net.sf.cglib.proxy.MethodProxy methodProxy)
- Creates an invocation.
- Parameters:
mockName - The name of the mock, not nullmethod - The method that was called, not nullarguments - The arguments that were used, not nullinvokedAt - The location of the invocation, not nullproxy - The proxy, not nullmethodProxy - The cglib method proxy, not null
invokeOriginalBehavior
public java.lang.Object invokeOriginalBehavior()
throws java.lang.Throwable
- Invokes the original behavior by calling the method proxy.
If there is no original behavior, e.g. an interface or abstract method, an exception is raised.
- Overrides:
invokeOriginalBehavior in class ProxyInvocation
- Returns:
- The result value
- Throws:
java.lang.Throwable
Copyright © 2009. All Rights Reserved.