类 CglibAopProxy.ProxyCallbackFilter
java.lang.Object
infra.aop.framework.CglibAopProxy.ProxyCallbackFilter
- 所有已实现的接口:
infra.bytecode.proxy.CallbackFilter
- 封闭类:
- CglibAopProxy
private static class CglibAopProxy.ProxyCallbackFilter
extends Object
implements infra.bytecode.proxy.CallbackFilter
CallbackFilter to assign Callbacks to methods.
-
字段概要
字段 -
构造器概要
构造器构造器说明ProxyCallbackFilter(AdvisedSupport advised, Map<Method, Integer> fixedInterceptorMap, int fixedInterceptorOffset) -
方法概要
-
字段详细资料
-
advised
-
fixedInterceptorMap
-
fixedInterceptorOffset
public final int fixedInterceptorOffset
-
-
构造器详细资料
-
ProxyCallbackFilter
public ProxyCallbackFilter(AdvisedSupport advised, Map<Method, Integer> fixedInterceptorMap, int fixedInterceptorOffset)
-
-
方法详细资料
-
accept
Implementation of CallbackFilter.accept() to return the index of the callback we need.The callbacks for each proxy are built up of a set of fixed callbacks for general use and then a set of callbacks that are specific to a method for use on static targets with a fixed advice chain.
The callback used is determined thus:
- For exposed proxies
- Exposing the proxy requires code to execute before and after the method/chain invocation. This means we must use DynamicAdvisedInterceptor, since all other interceptors can avoid the need for a try/catch block
- For Object.finalize():
- No override for this method is used.
- For equals():
- The EqualsInterceptor is used to redirect equals() calls to a special handler to this proxy.
- For methods on the Advised class:
- the AdvisedDispatcher is used to dispatch the call directly to the target
- For advised methods:
- If the target is static and the advice chain is frozen then a FixedChainStaticTargetInterceptor specific to the method is used to invoke the advice chain. Otherwise a DynamicAdvisedInterceptor is used.
- For non-advised methods:
- Where it can be determined that the method will not return
thisor whenProxyFactory.getExposeProxy()returnsfalse, then a Dispatcher is used. For static targets, the StaticDispatcher is used; and for dynamic targets, a DynamicUnadvisedInterceptor is used. If it possible for the method to returnthisthen a StaticUnadvisedInterceptor is used for static targets - the DynamicUnadvisedInterceptor already considers this.
- 指定者:
accept在接口中infra.bytecode.proxy.CallbackFilter
-
equals
-
hashCode
public int hashCode()
-