public interface MethodInvocation extends MethodInvocationResult, AnnotationAccess
MethodAdvice| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getInstance()
The instance on which the method was originally invoked.
|
InstanceContext |
getInstanceContext() |
java.lang.reflect.Method |
getMethod()
Returns the method being invoked.
|
java.lang.Object |
getParameter(int index)
Returns the parameter at the given index.
|
MethodInvocation |
proceed()
Proceed with the method invocation, either chaining into the next
MethodAdvice added to the method, or
ultimately into the actual method implementation. |
MethodInvocation |
setCheckedException(java.lang.Exception exception)
Sets the checked exception; this can be used to indicate failure for the method, or
to cancel the thrown exception (by setting the exception to null).
|
MethodInvocation |
setParameter(int index,
java.lang.Object newValue)
Changes a parameter value.
|
MethodInvocation |
setReturnValue(java.lang.Object returnValue)
Overrides the return value of the method.
|
didThrowCheckedException, getCheckedException, getReturnValue, rethrowgetAnnotation, hasAnnotationjava.lang.Object getInstance()
InstanceContext getInstanceContext()
MethodInvocation proceed()
MethodAdvice added to the method, or
ultimately into the actual method implementation. The method may throw a checked exception, which will be caught
and be reported as MethodInvocationResult.didThrowCheckedException().MethodInvocation setReturnValue(java.lang.Object returnValue)
returnValue - java.lang.NullPointerException - if the method's return type is a primitive and null is providedjava.lang.Object getParameter(int index)
index - of parameter to accessMethodInvocation setParameter(int index, java.lang.Object newValue)
index - index of parameter to modifynewValue - new value for parameterMethodInvocation setCheckedException(java.lang.Exception exception)
exception - new checked exception, or nulljava.lang.reflect.Method getMethod()
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.