org.easetech.easytest.interceptor
Class InternalInterceptor
java.lang.Object
org.easetech.easytest.interceptor.InternalInterceptor
- All Implemented Interfaces:
- net.sf.cglib.proxy.Callback, net.sf.cglib.proxy.MethodInterceptor
public class InternalInterceptor
- extends Object
- implements net.sf.cglib.proxy.MethodInterceptor
An internal intercepter implementation of the CGLIB provided MethodInterceptor interface, that
actually calls the MethodIntercepter.intercept(Method, Object, Object[]) method internally.
This is done so as to hide the implementation details of intercepting method calls from the user.
A user can extend this class to modify the behavior of the default
MethodInterceptor.intercept(Object, Method, Object[], MethodProxy) method implementation
- Author:
- Anuj Kumar
|
Field Summary |
protected static org.slf4j.Logger |
LOG
An instance of logger associated with the test framework. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.slf4j.Logger LOG
- An instance of logger associated with the test framework.
InternalInterceptor
public InternalInterceptor()
intercept
public Object intercept(Object object,
Method method,
Object[] args,
net.sf.cglib.proxy.MethodProxy methodProxy)
throws Throwable
- Intercept the method with the advice
- Specified by:
intercept in interface net.sf.cglib.proxy.MethodInterceptor
- Parameters:
object - the object on which to invoke the methodmethod - the method to invokeargs - arguments to the methodmethodProxy - the method proxy
- Returns:
- returned value
- Throws:
Throwable
getUserIntercepter
public MethodIntercepter getUserIntercepter()
- Returns:
- the userIntercepter
setUserIntercepter
public void setUserIntercepter(MethodIntercepter userIntercepter)
- Parameters:
userIntercepter - the userIntercepter to set
getTargetInstance
public Object getTargetInstance()
- Returns:
- the targetInstance
setTargetInstance
public void setTargetInstance(Object targetInstance)
- Parameters:
targetInstance - the targetInstance to set
Copyright © 2013. All Rights Reserved.