public class InterceptionContextImpl extends java.lang.Object implements InterceptionContext
Constructor and Description |
---|
InterceptionContextImpl(java.lang.Object target,
java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Creates a new InterceptionContextImpl
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
args() |
java.lang.Object |
invoke()
Invokes the intercepted method on the
target object. |
java.lang.Object |
invokeOn(java.lang.Object target)
Invokes the intercepted method on the given target object.
|
java.lang.reflect.Method |
method() |
java.lang.reflect.Method |
methodOn(java.lang.Object target) |
java.lang.Object |
proxy() |
java.lang.Object |
target() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
targetMethod
public InterceptionContextImpl(java.lang.Object target, java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
proxy
- the proxy instance that the method was invoked onmethod
- the Method
instance corresponding to the method
invoked on the proxy instanceargs
- the arguments passed in the method invocation on the proxy
instancepublic java.lang.Object invoke() throws java.lang.Throwable
InterceptionContext
target
object.invoke
in interface InterceptionContext
java.lang.Throwable
- if an error occurs in the method.public java.lang.Object invokeOn(java.lang.Object target) throws java.lang.Throwable
InterceptionContext
invokeOn
in interface InterceptionContext
target
- the target objectjava.lang.Throwable
- if an error occurs in the method.public java.lang.reflect.Method methodOn(java.lang.Object target)
methodOn
in interface InterceptionContext
target
- the target to get the method.public java.lang.Object target()
target
in interface InterceptionContext
null
if is not defined.public java.lang.Object[] args()
args
in interface InterceptionContext
null
if the method takes no parameters.public java.lang.Object proxy()
proxy
in interface InterceptionContext
public java.lang.reflect.Method method()
method
in interface InterceptionContext
Method
instance corresponding to the method
invoked on the proxy instance