类 MethodBeforeAdviceInterceptor
- java.lang.Object
- org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor
- 所有已实现的接口:
Serializable
,Advice
,Interceptor
,MethodInterceptor
,BeforeAdvice
public class MethodBeforeAdviceInterceptor extends Object implements MethodInterceptor, BeforeAdvice, Serializable
Interceptor to wrap amMethodBeforeAdvice
. Used internally by the AOP framework; application developers should not need to use this class directly.- 作者:
- Rod Johnson
- 另请参阅:
AfterReturningAdviceInterceptor
,ThrowsAdviceInterceptor
, 序列化表格
构造器概要
构造器 构造器 说明 MethodBeforeAdviceInterceptor(MethodBeforeAdvice advice)
Create a new MethodBeforeAdviceInterceptor for the given advice.
构造器详细资料
MethodBeforeAdviceInterceptor
public MethodBeforeAdviceInterceptor(MethodBeforeAdvice advice)
Create a new MethodBeforeAdviceInterceptor for the given advice.- 参数:
advice
- the MethodBeforeAdvice to wrap
方法详细资料
invoke
public Object invoke(MethodInvocation mi) throws Throwable
从接口复制的说明:MethodInterceptor
Implement this method to perform extra treatments before and after the invocation. Polite implementations would certainly like to invokeJoinpoint.proceed()
.- 指定者:
invoke
在接口中MethodInterceptor
- 参数:
mi
- the method invocation joinpoint- 返回:
- the result of the call to
Joinpoint.proceed()
; might be intercepted by the interceptor - 抛出:
Throwable
- if the interceptors or the target object throws an exception