接口 MethodBeforeAdvice
- 所有超级接口:
Advice
,BeforeAdvice
- 所有已知实现类:
AspectJMethodBeforeAdvice
public interface MethodBeforeAdvice extends BeforeAdvice
Advice invoked before a method is invoked. Such advices cannot prevent the method call proceeding, unless they throw a Throwable.- 作者:
- Rod Johnson
- 另请参阅:
AfterReturningAdvice
,ThrowsAdvice
方法详细资料
before
void before(Method method, Object[] args, Object target) throws Throwable
Callback before a given method is invoked.- 参数:
method
- method being invokedargs
- arguments to the methodtarget
- target of the method invocation. May benull
.- 抛出:
Throwable
- if this object wishes to abort the call. Any exception thrown will be returned to the caller if it's allowed by the method signature. Otherwise the exception will be wrapped as a runtime exception.