public class Invocation extends Object
Modifier | Constructor and Description |
---|---|
protected |
Invocation() |
|
Invocation(Action action,
Controller controller) |
|
Invocation(Object target,
Method method,
Object[] args,
net.sf.cglib.proxy.MethodProxy methodProxy,
Interceptor[] inters) |
Modifier and Type | Method and Description |
---|---|
String |
getActionKey()
Return the action key.
|
Object |
getArg(int index) |
Object[] |
getArgs() |
Controller |
getController()
Return the controller of this action.
|
String |
getControllerKey()
Return the controller key.
|
Method |
getMethod()
Return the method of this action.
|
String |
getMethodName()
Return the method name of this action's method.
|
<T> T |
getReturnValue()
Get the return value of the target method
|
<T> T |
getTarget()
Get the target object which be intercepted
|
String |
getViewPath()
Return view path of this controller.
|
void |
invoke() |
boolean |
isActionInvocation()
return true if it is action invocation.
|
void |
setArg(int index,
Object value) |
void |
setReturnValue(Object returnValue)
Set the return value of the target method
|
protected Invocation()
public Invocation(Action action, Controller controller)
public Invocation(Object target, Method method, Object[] args, net.sf.cglib.proxy.MethodProxy methodProxy, Interceptor[] inters)
public void invoke()
public Object getArg(int index)
public void setArg(int index, Object value)
public Object[] getArgs()
public <T> T getTarget()
Example: OrderService os = getTarget();
public Method getMethod()
You can getMethod.getAnnotations() to get annotation on action method to do more things
public String getMethodName()
public <T> T getReturnValue()
public void setReturnValue(Object returnValue)
public Controller getController()
public String getActionKey()
public String getControllerKey()
public String getViewPath()
public boolean isActionInvocation()
Copyright © 2018. All rights reserved.