类 DefaultAdvisorAdapterRegistry
java.lang.Object
infra.aop.framework.adapter.DefaultAdvisorAdapterRegistry
- 所有已实现的接口:
AdvisorAdapterRegistry,Serializable
public class DefaultAdvisorAdapterRegistry
extends Object
implements AdvisorAdapterRegistry, Serializable
Default implementation of the
AdvisorAdapterRegistry interface.
Supports MethodInterceptor,
MethodBeforeAdvice,
AfterReturningAdvice,
ThrowsAdvice.- 从以下版本开始:
- 4.0
- 作者:
- Rod Johnson, Rob Harrop, Juergen Hoeller, Harry Yang
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明private final ArrayList<AdvisorAdapter>private static AdvisorAdapterRegistryKeep track of a single instance so we can return it to classes that request it.private static final long -
构造器概要
构造器构造器说明Create a new DefaultAdvisorAdapterRegistry, registering well-known adapters. -
方法概要
修饰符和类型方法说明static AdvisorAdapterRegistryReturn the singletonDefaultAdvisorAdapterRegistryinstance.getInterceptors(Advisor advisor) Return an array of AOP Alliance MethodInterceptors to allow use of the given Advisor in an interception-based framework.voidregisterAdvisorAdapter(AdvisorAdapter adapter) Register the givenAdvisorAdapter.(专用程序包) static voidreset()Reset the singletonDefaultAdvisorAdapterRegistry, removing anyregisteredadapters.Return anAdvisorwrapping the given advice.
-
字段详细资料
-
serialVersionUID
private static final long serialVersionUID- 另请参阅:
-
instance
Keep track of a single instance so we can return it to classes that request it. -
adapters
-
-
构造器详细资料
-
DefaultAdvisorAdapterRegistry
public DefaultAdvisorAdapterRegistry()Create a new DefaultAdvisorAdapterRegistry, registering well-known adapters.
-
-
方法详细资料
-
wrap
从接口复制的说明:AdvisorAdapterRegistryReturn anAdvisorwrapping the given advice.Should by default at least support
MethodInterceptor,MethodBeforeAdvice,AfterReturningAdvice,ThrowsAdvice.- 指定者:
wrap在接口中AdvisorAdapterRegistry- 参数:
adviceObject- an object that should be an advice- 返回:
- an Advisor wrapping the given advice (never
null; if the advice parameter is an Advisor, it is to be returned as-is) - 抛出:
UnknownAdviceTypeException- if no registered advisor adapter can wrap the supposed advice
-
getInterceptors
从接口复制的说明:AdvisorAdapterRegistryReturn an array of AOP Alliance MethodInterceptors to allow use of the given Advisor in an interception-based framework.Don't worry about the pointcut associated with the
Advisor, if it is aPointcutAdvisor: just return an interceptor.- 指定者:
getInterceptors在接口中AdvisorAdapterRegistry- 参数:
advisor- the Advisor to find an interceptor for- 返回:
- a list of MethodInterceptors to expose this Advisor's behavior
- 抛出:
UnknownAdviceTypeException- if the Advisor type is not understood by any registered AdvisorAdapter
-
registerAdvisorAdapter
从接口复制的说明:AdvisorAdapterRegistryRegister the givenAdvisorAdapter. Note that it is not necessary to register adapters for an AOP Alliance Interceptors or Advices: these must be automatically recognized by anAdvisorAdapterRegistryimplementation.- 指定者:
registerAdvisorAdapter在接口中AdvisorAdapterRegistry- 参数:
adapter- an AdvisorAdapter that understands particular Advisor or Advice types
-
getInstance
Return the singletonDefaultAdvisorAdapterRegistryinstance. -
reset
static void reset()Reset the singletonDefaultAdvisorAdapterRegistry, removing anyregisteredadapters.
-