Top Description Fields Constructors Methods
org.springframework.aop.framework.adapter

public Class MethodBeforeAdviceInterceptor

extends Object
implements MethodInterceptor, BeforeAdvice, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.springframework.aop.BeforeAdvice, org.aopalliance.aop.Advice, org.aopalliance.intercept.MethodInterceptor, org.aopalliance.intercept.Interceptor
Annotations
@SuppressWarnings:serial
Imports
java.io.Serializable, org.aopalliance.intercept.MethodInterceptor, .MethodInvocation, org.springframework.aop.BeforeAdvice, .MethodBeforeAdvice, org.springframework.lang.Nullable, org.springframework.util.Assert

Interceptor to wrap a MethodBeforeAdvice.

Used internally by the AOP framework; application developers should not need to use this class directly.

Author
Rod Johnson
See Also
AfterReturningAdviceInterceptor, ThrowsAdviceInterceptor

Field Summary

Modifier and TypeField and Description
private final MethodBeforeAdvice

Constructor Summary

AccessConstructor and Description
public
MethodBeforeAdviceInterceptor(MethodBeforeAdvice
the MethodBeforeAdvice to wrap
advice
)

Create a new MethodBeforeAdviceInterceptor for the given advice.

Method Summary

Modifier and TypeMethod and Description
public Object
invoke(MethodInvocation
the method invocation joinpoint
mi
)

Implements org.aopalliance.intercept.MethodInterceptor.invoke.

Implement this method to perform extra treatments before and after the invocation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

adviceback to summary
private final MethodBeforeAdvice advice

Constructor Detail

MethodBeforeAdviceInterceptorback to summary
public MethodBeforeAdviceInterceptor(MethodBeforeAdvice advice)

Create a new MethodBeforeAdviceInterceptor for the given advice.

Parameters
advice:MethodBeforeAdvice

the MethodBeforeAdvice to wrap

Method Detail

invokeback to summary
public Object invoke(MethodInvocation mi) throws Throwable

Implements org.aopalliance.intercept.MethodInterceptor.invoke.

Doc from org.aopalliance.intercept.MethodInterceptor.invoke.

Implement this method to perform extra treatments before and after the invocation. Polite implementations would certainly like to invoke Joinpoint#proceed().

Parameters
mi:MethodInvocation

the method invocation joinpoint

Returns:Object

the result of the call to Joinpoint#proceed(); might be intercepted by the interceptor

Annotations
@Override
@Nullable
Exceptions
Throwable:
if the interceptors or the target object throws an exception