This is pulled out into a strategy as various approaches are possible, including using CGLIB to create subclasses on the fly to support Method Injection.
| Modifier and Type | Method and Description |
|---|---|
| public default Class | getActualBeanClass(RootBeanDefinition bd, String beanName, BeanFactory owner)
Determine the actual class for the given bean definition, as instantiated at runtime. |
| public Object | Returns: a bean instance for this bean definitionthe bean definition bd, String the name of the bean when it is created in this context.
The name can be beanName, BeanFactory null if we are autowiring a bean which doesn't
belong to the factory.the owning BeanFactory owner)Return an instance of the bean with the given name in this factory. |
| public Object | Returns: a bean instance for this bean definitionthe bean definition bd, String the name of the bean when it is created in this context.
The name can be beanName, BeanFactory null if we are autowiring a bean which doesn't
belong to the factory.the owning BeanFactory owner, Constructor<?> the constructor to use ctor, Object... the constructor arguments to apply args)Return an instance of the bean with the given name in this factory, creating it via the given constructor. |
| public Object | Returns: a bean instance for this bean definitionthe bean definition bd, String the name of the bean when it is created in this context.
The name can be beanName, BeanFactory null if we are autowiring a bean which doesn't
belong to the factory.the owning BeanFactory owner, Object the factory bean instance to call the factory method on,
or factoryBean, Method null in case of a static factory methodthe factory method to use factoryMethod, Object... the factory method arguments to apply args)Return an instance of the bean with the given name in this factory, creating it via the given factory method. |
| getActualBeanClass | back to summary |
|---|---|
| public default Class Determine the actual class for the given bean definition, as instantiated at runtime.
| |
| instantiate | back to summary |
|---|---|
| public Object instantiate(RootBeanDefinition bd, String beanName, BeanFactory owner) throws BeansException Return an instance of the bean with the given name in this factory.
| |
| instantiate | back to summary |
|---|---|
| public Object instantiate(RootBeanDefinition bd, String beanName, BeanFactory owner, Constructor<?> ctor, Object... args) throws BeansException Return an instance of the bean with the given name in this factory, creating it via the given constructor.
| |
| instantiate | back to summary |
|---|---|
| public Object instantiate(RootBeanDefinition bd, String beanName, BeanFactory owner, Object factoryBean, Method factoryMethod, Object... args) throws BeansException Return an instance of the bean with the given name in this factory, creating it via the given factory method.
| |