@ -25,6 +25,7 @@ import org.apache.commons.logging.LogFactory;
@@ -25,6 +25,7 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeanInstantiationException ;
import org.springframework.beans.BeanUtils ;
import org.springframework.beans.factory.BeanFactory ;
import org.springframework.cglib.core.SpringNamingPolicy ;
import org.springframework.cglib.proxy.Callback ;
import org.springframework.cglib.proxy.CallbackFilter ;
@ -146,7 +147,7 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
@@ -146,7 +147,7 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
Enhancer enhancer = new Enhancer ( ) ;
enhancer . setSuperclass ( beanDefinition . getBeanClass ( ) ) ;
enhancer . setNamingPolicy ( SpringNamingPolicy . INSTANCE ) ;
enhancer . setCallbackFilter ( new CallbackFilterImpl ( beanDefinition ) ) ;
enhancer . setCallbackFilter ( new MethodOverride CallbackFilter( beanDefinition ) ) ;
enhancer . setCallbackTypes ( CALLBACK_TYPES ) ;
return enhancer . createClass ( ) ;
}
@ -166,34 +167,31 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
@@ -166,34 +167,31 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
this . beanDefinition = beanDefinition ;
}
/ * *
* Exposed for equals method to allow access to enclosing class field
* /
protected RootBeanDefinition getBeanDefinition ( ) {
return beanDefinition ;
RootBeanDefinition getBeanDefinition ( ) {
return this . beanDefinition ;
}
@Override
public boolean equals ( Object other ) {
return ( other . getClass ( ) . equals ( getClass ( ) ) & & ( ( CglibIdentitySupport ) other ) . getBeanDefinition ( ) . equals (
beanDefinition ) ) ;
return other . getClass ( ) . equals ( this . getClass ( ) )
& & ( ( Cgli bIdentitySupport ) other ) . getB eanDefinition ( ) . equals ( this . getBeanDefinition ( ) ) ;
}
@Override
public int hashCode ( ) {
return beanDefinition . hashCode ( ) ;
return this . beanDefinition . hashCode ( ) ;
}
}
/ * *
* CGLIB object to filter method interception behavior .
* CGLIB callback for filtering method interception behavior .
* /
private static class CallbackFilterImpl extends CglibIdentitySupport implements CallbackFilter {
private static class MethodOverride CallbackFilter extends CglibIdentitySupport implements CallbackFilter {
private static final Log logger = LogFactory . getLog ( CallbackFilterImpl . class ) ;
private static final Log logger = LogFactory . getLog ( MethodOverride CallbackFilter. class ) ;
CallbackFilterImpl ( RootBeanDefinition beanDefinition ) {
MethodOverride CallbackFilter( RootBeanDefinition beanDefinition ) {
super ( beanDefinition ) ;
}