public class SimpleAspect extends Object implements Aspect, Serializable
Constructor and Description |
---|
SimpleAspect() |
Modifier and Type | Method and Description |
---|---|
boolean |
after(Object target,
Method method,
Object[] args,
Object returnVal)
目标方法执行后的操作
如果 target.method 抛出异常且 Aspect.afterException(java.lang.Object, java.lang.reflect.Method, java.lang.Object[], java.lang.Throwable) 返回true,则不会执行此操作如果 Aspect.afterException(java.lang.Object, java.lang.reflect.Method, java.lang.Object[], java.lang.Throwable) 返回false,则无论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)
Aspect
public boolean after(Object target, Method method, Object[] args, Object returnVal)
Aspect
Aspect.afterException(java.lang.Object, java.lang.reflect.Method, java.lang.Object[], java.lang.Throwable)
返回true,则不会执行此操作Aspect.afterException(java.lang.Object, java.lang.reflect.Method, java.lang.Object[], java.lang.Throwable)
返回false,则无论target.method是否抛出异常,均会执行此操作Copyright © 2024. All rights reserved.