public class CglibProxyMethodInterceptor<T> extends Object implements net.sf.cglib.proxy.MethodInterceptor
| Modifier and Type | Class and Description |
|---|---|
static class |
CglibProxyMethodInterceptor.CglibProxyInvocation
An invocation implementation that uses the cglib method proxy to be able to invoke the original behavior.
|
| Constructor and Description |
|---|
CglibProxyMethodInterceptor(String mockName,
Class<T> proxiedType,
ProxyInvocationHandler invocationHandler)
Creates an interceptor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getMockName() |
Class<?> |
getProxiedType() |
Object |
intercept(Object proxy,
Method method,
Object[] arguments,
net.sf.cglib.proxy.MethodProxy methodProxy)
Intercepts the method call by wrapping the invocation in a
CglibProxyMethodInterceptor.CglibProxyInvocation and delegating the
handling to the invocation handler. |
public CglibProxyMethodInterceptor(String mockName, Class<T> proxiedType, ProxyInvocationHandler invocationHandler)
mockName - The name of the mock, not nullproxiedType - The proxied type, not nullinvocationHandler - The handler to delegate the invocations to, not nullpublic Object intercept(Object proxy, Method method, Object[] arguments, net.sf.cglib.proxy.MethodProxy methodProxy) throws Throwable
CglibProxyMethodInterceptor.CglibProxyInvocation and delegating the
handling to the invocation handler.intercept in interface net.sf.cglib.proxy.MethodInterceptorproxy - The proxy, not nullmethod - The method that was called, not nullarguments - The arguments that were used, not nullmethodProxy - The cglib method proxy, not nullThrowablepublic String getMockName()
public Class<?> getProxiedType()
Copyright © 2016. All Rights Reserved.