org.springframework.beans.factory.support
Class CglibSubclassingInstantiationStrategy.CglibSubclassCreator

java.lang.Object
  extended by org.springframework.beans.factory.support.CglibSubclassingInstantiationStrategy.CglibSubclassCreator
Enclosing class:
CglibSubclassingInstantiationStrategy

private static class CglibSubclassingInstantiationStrategy.CglibSubclassCreator
extends java.lang.Object

An inner class so we don't have a CGLIB dependency in core.


Nested Class Summary
private  class CglibSubclassingInstantiationStrategy.CglibSubclassCreator.CallbackFilterImpl
          CGLIB object to filter method interception behavior.
private  class CglibSubclassingInstantiationStrategy.CglibSubclassCreator.CglibIdentitySupport
          Class providing hashCode and equals methods required by CGLIB to ensure that CGLIB doesn't generate a distinct class per bean.
private  class CglibSubclassingInstantiationStrategy.CglibSubclassCreator.LookupOverrideMethodInterceptor
          CGLIB MethodInterceptor to override methods, replacing them with an implementation that returns a bean looked up in the container.
private  class CglibSubclassingInstantiationStrategy.CglibSubclassCreator.ReplaceOverrideMethodInterceptor
          CGLIB MethodInterceptor to override methods, replacing them with a call to a generic MethodReplacer.
 
Field Summary
private  RootBeanDefinition beanDefinition
           
private static Log logger
           
private  BeanFactory owner
           
 
Constructor Summary
CglibSubclassingInstantiationStrategy.CglibSubclassCreator(RootBeanDefinition beanDefinition, BeanFactory owner)
           
 
Method Summary
 java.lang.Object instantiate(java.lang.reflect.Constructor ctor, java.lang.Object[] args)
          Create a new instance of a dynamically generated subclasses implementing the required lookups.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final Log logger

beanDefinition

private final RootBeanDefinition beanDefinition

owner

private final BeanFactory owner
Constructor Detail

CglibSubclassingInstantiationStrategy.CglibSubclassCreator

public CglibSubclassingInstantiationStrategy.CglibSubclassCreator(RootBeanDefinition beanDefinition,
                                                                  BeanFactory owner)
Method Detail

instantiate

public java.lang.Object instantiate(java.lang.reflect.Constructor ctor,
                                    java.lang.Object[] args)
Create a new instance of a dynamically generated subclasses implementing the required lookups.

Parameters:
ctor - constructor to use. If this is null, use the no-arg constructor (no parameterization, or Setter Injection)
args - arguments to use for the constructor. Ignored if the ctor parameter is null.
Returns:
new instance of the dynamically generated class