org.nutz.aop
类 InterceptorChain
java.lang.Object
org.nutz.aop.InterceptorChain
public class InterceptorChain
- extends java.lang.Object
拦截器链,持有被调用方法的信息
- 作者:
- wendal(wendal1985@gmail.com)
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
callingMethod
protected java.lang.reflect.Method callingMethod
methodIndex
protected int methodIndex
args
protected java.lang.Object[] args
callingObj
protected AopCallback callingObj
returnValue
protected java.lang.Object returnValue
miList
protected java.util.List<MethodInterceptor> miList
InterceptorChain
public InterceptorChain(int methodIndex,
java.lang.Object obj,
java.lang.reflect.Method method,
java.util.List<MethodInterceptor> miList,
java.lang.Object[] args)
doChain
public InterceptorChain doChain()
throws java.lang.Throwable
- 继续执行下一个拦截器,如果已经没有剩下的拦截器,则执行原方法
- 返回:
- 拦截器链本身
- 抛出:
java.lang.Throwable
- 下层拦截器或原方法抛出的一切异常
invoke
public void invoke()
throws java.lang.Throwable
- 执行原方法,一般情况下不应该直接被调用
- 抛出:
java.lang.Throwable
- 原方法抛出的一切异常
getReturn
public java.lang.Object getReturn()
- 获取返回值
- 返回:
- 返回值
getCallingMethod
public java.lang.reflect.Method getCallingMethod()
getArgs
public java.lang.Object[] getArgs()
setReturnValue
public void setReturnValue(java.lang.Object returnValue)
getCallingObj
public AopCallback getCallingObj()
isInvoked
public boolean isInvoked()