public class AspectjSimple extends Object implements Aspectj, Serializable
| Constructor and Description |
|---|
AspectjSimple() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
after(Object target,
Method method,
Object[] args)
目标方法执行后的操作
如果 target.method 抛出异常且
|
boolean |
after(Object target,
Method method,
Object[] args,
Object returnVal)
目标方法执行后的操作
如果 target.method 抛出异常且
|
boolean |
afterException(Object target,
Method method,
Object[] args,
Throwable e)
目标方法抛出异常时的操作
|
boolean |
before(Object target,
Method method,
Object[] args)
目标方法执行前的操作
|
public boolean before(Object target, Method method, Object[] args)
Aspectjpublic boolean after(Object target, Method method, Object[] args)
target - 目标对象method - 目标方法args - 参数返回true,则不会执行此操作
如果,
返回false,则无论target.method是否抛出异常,均会执行此操作public boolean after(Object target, Method method, Object[] args, Object returnVal)
Aspectjafter in interface Aspectjtarget - 目标对象method - 目标方法args - 参数returnVal - 目标方法执行返回值返回true,则不会执行此操作
如果,
返回false,则无论target.method是否抛出异常,均会执行此操作Copyright © 2021. All rights reserved.