Class Cglib2AopProxy.ProxyCallbackFilter

  extended by org.springframework.aop.framework.Cglib2AopProxy.ProxyCallbackFilter
Enclosing class:

private static class Cglib2AopProxy.ProxyCallbackFilter
extends java.lang.Object

CallbackFilter to assign Callbacks to methods.

Field Summary
private  AdvisedSupport advised
private  java.util.Map<java.lang.String,java.lang.Integer> fixedInterceptorMap
private  int fixedInterceptorOffset
Constructor Summary
Cglib2AopProxy.ProxyCallbackFilter(AdvisedSupport advised, java.util.Map<java.lang.String,java.lang.Integer> fixedInterceptorMap, int fixedInterceptorOffset)
Method Summary
 int accept(java.lang.reflect.Method method)
          Implementation of CallbackFilter.accept() to return the index of the callback we need.
 boolean equals(java.lang.Object other)
private  boolean equalsAdviceClasses(Advisor a, Advisor b)
private  boolean equalsPointcuts(Advisor a, Advisor b)
 int hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail


private final AdvisedSupport advised


private final java.util.Map<java.lang.String,java.lang.Integer> fixedInterceptorMap


private final int fixedInterceptorOffset
Constructor Detail


public Cglib2AopProxy.ProxyCallbackFilter(AdvisedSupport advised,
                                          java.util.Map<java.lang.String,java.lang.Integer> fixedInterceptorMap,
                                          int fixedInterceptorOffset)
Method Detail


public int accept(java.lang.reflect.Method method)
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 DyanmicAdvisedInterceptor is used.
For non-advised methods:
Where it can be determined that the method will not return this or when ProxyFactory.getExposeProxy() returns false, 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 return this then a StaticUnadvisedInterceptor is used for static targets - the DynamicUnadvisedInterceptor already considers this.


public boolean equals(java.lang.Object other)
equals in class java.lang.Object


private boolean equalsAdviceClasses(Advisor a,
                                    Advisor b)


private boolean equalsPointcuts(Advisor a,
                                Advisor b)


public int hashCode()
hashCode in class java.lang.Object