| 构造器和说明 |
|---|
AspectProxy() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
after(Class<?> cls,
Method method,
Object[] params,
Object result)
后置方法
|
void |
before(Class<?> cls,
Method method,
Object[] params)
前置方法
|
void |
begin()
开始切面方法
可以选择重写方法进行实现前开始切面
|
Object |
doProxy(ProxyChain proxyChain)
执行代理,实际执行的是 ProxyChain 对象
|
void |
end()
结束方法
|
void |
error(Class<?> cls,
Method method,
Object[] params,
Throwable e)
调用错误处理
|
boolean |
intercept(Class<?> cls,
Method method,
Object[] params)
这个暂时不知道什么作用,默认返回的就是 true
|
public Object doProxy(ProxyChain proxyChain) throws Throwable
public void begin()
public boolean intercept(Class<?> cls, Method method, Object[] params) throws Throwable
cls - method - params - Throwablepublic void before(Class<?> cls, Method method, Object[] params) throws Throwable
cls - method - params - Throwablepublic void after(Class<?> cls, Method method, Object[] params, Object result) throws Throwable
cls - method - params - result - Throwablepublic void error(Class<?> cls, Method method, Object[] params, Throwable e)
cls - method - params - e - public void end()
Copyright © 2019. All rights reserved.