public abstract class Aspect extends Object implements InvocationHandler
| 限定符和类型 | 方法和说明 |
|---|---|
abstract boolean |
after(Object target,
Method method,
Object[] args)
目标方法执行后的操作
|
abstract boolean |
afterException(Object target,
Method method,
Object[] args,
Throwable e)
目标方法抛出异常时的操作
|
abstract boolean |
before(Object target,
Method method,
Object[] args)
目标方法执行前的操作
|
Object |
getTarget() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
public Aspect(Object target)
public Object getTarget()
public abstract boolean before(Object target, Method method, Object[] args)
target - 目标对象method - 目标方法args - 参数public abstract boolean after(Object target, Method method, Object[] args)
target - 目标对象method - 目标方法args - 参数public abstract boolean afterException(Object target, Method method, Object[] args, Throwable e)
target - 目标对象method - 目标方法args - 参数e - 异常Copyright © 2017. All rights reserved.