spring-framework / org.springframework.beans.factory.support / CglibSubclassingInstantiationStrategy

CglibSubclassingInstantiationStrategy

open class CglibSubclassingInstantiationStrategy : SimpleInstantiationStrategy

Default object instantiation strategy for use in BeanFactories.

Uses CGLIB to generate subclasses dynamically if methods need to be overridden by the container to implement Method Injection.

Author
Rod Johnson

Author
Juergen Hoeller

Author
Sam Brannen

Since
1.1

Constructors

<init>

CglibSubclassingInstantiationStrategy()

Default object instantiation strategy for use in BeanFactories.

Uses CGLIB to generate subclasses dynamically if methods need to be overridden by the container to implement Method Injection.

Inherited Functions

getCurrentlyInvokedFactoryMethod

open static fun getCurrentlyInvokedFactoryMethod(): Method

Return the factory method currently being invoked or null if none.

Allows factory method implementations to determine whether the current caller is the container itself as opposed to user code.

instantiate

open fun instantiate(bd: RootBeanDefinition, beanName: String, owner: BeanFactory): Any
open fun instantiate(bd: RootBeanDefinition, beanName: String, owner: BeanFactory, ctor: Constructor<*>, vararg args: Any): Any
open fun instantiate(bd: RootBeanDefinition, beanName: String, owner: BeanFactory, factoryBean: Any, factoryMethod: Method, vararg args: Any): Any