public class ExposeInvocationInterceptor extends Object implements MethodInterceptor, org.springframework.core.PriorityOrdered, Serializable
MethodInvocation
as a thread-local object. We occasionally need to do this; for example, when a pointcut
(e.g. an AspectJ expression pointcut) needs to know the full invocation context.
Don't use this interceptor unless this is really necessary. Target objects should not normally know about Spring AOP, as this creates a dependency on Spring API. Target objects should be plain POJOs as far as possible.
If used, this interceptor will normally be the first in the interceptor chain.
| 限定符和类型 | 字段和说明 |
|---|---|
static Advisor |
ADVISOR
Singleton advisor for this class.
|
static ExposeInvocationInterceptor |
INSTANCE
Singleton instance of this class
|
| 限定符和类型 | 方法和说明 |
|---|---|
static MethodInvocation |
currentInvocation()
Return the AOP Alliance MethodInvocation object associated with the current invocation.
|
int |
getOrder() |
Object |
invoke(MethodInvocation mi)
方法实现说明
|
public static final ExposeInvocationInterceptor INSTANCE
public static final Advisor ADVISOR
public static MethodInvocation currentInvocation() throws IllegalStateException
IllegalStateException - if there is no AOP invocation in progress,
or if the ExposeInvocationInterceptor was not added to this interceptor chainpublic Object invoke(MethodInvocation mi) throws Throwable
MethodInterceptorinvoke 在接口中 MethodInterceptormi - 主要实现类:ReflectiveMethodInvocationThrowablepublic int getOrder()
getOrder 在接口中 org.springframework.core.Ordered