Does not support Method Injection, although it provides hooks for subclasses to override to add Method Injection support, for example by overriding methods.
| Modifier and Type | Field and Description |
|---|---|
| private static final ThreadLocal |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Method | getCurrentlyInvokedFactoryMethod()
Return the factory method currently being invoked or |
| public Object | instantiate(RootBeanDefinition
the 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)Implements org. |
| public Object | instantiate(RootBeanDefinition
the 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)Implements org. |
| public Object | instantiate(RootBeanDefinition
the 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)Implements org. |
| protected Object | instantiateWithMethodInjection(RootBeanDefinition bd, String beanName, BeanFactory owner)
Subclasses can override this method, which is implemented to throw UnsupportedOperationException, if they can instantiate an object with the Method Injection specified in the given RootBeanDefinition. |
| protected Object | instantiateWithMethodInjection(RootBeanDefinition bd, String beanName, BeanFactory owner, Constructor<?> ctor, Object... args)
Subclasses can override this method, which is implemented to throw UnsupportedOperationException, if they can instantiate an object with the Method Injection specified in the given RootBeanDefinition. |
| public static void | setCurrentlyInvokedFactoryMethod(Method
the factory method currently being invoked or method)nullSet the factory method currently being invoked or |
| currentlyInvokedFactoryMethod | back to summary |
|---|---|
| private static final ThreadLocal<Method> currentlyInvokedFactoryMethod | |
| SimpleInstantiationStrategy | back to summary |
|---|---|
| public SimpleInstantiationStrategy() | |
| getCurrentlyInvokedFactoryMethod | back to summary |
|---|---|
| public static Method getCurrentlyInvokedFactoryMethod() Return the factory method currently being invoked or Allows factory method implementations to determine whether the current caller is the container itself as opposed to user code.
| |
| instantiate | back to summary |
|---|---|
| public Object instantiate(RootBeanDefinition bd, String beanName, BeanFactory owner) Implements org. Doc from org. 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) Implements org. Doc from org. 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) Implements org. Doc from org. Return an instance of the bean with the given name in this factory, creating it via the given factory method.
| |
| instantiateWithMethodInjection | back to summary |
|---|---|
| protected Object instantiateWithMethodInjection(RootBeanDefinition bd, String beanName, BeanFactory owner) Subclasses can override this method, which is implemented to throw UnsupportedOperationException, if they can instantiate an object with the Method Injection specified in the given RootBeanDefinition. Instantiation should use a no-arg constructor. | |
| instantiateWithMethodInjection | back to summary |
|---|---|
| protected Object instantiateWithMethodInjection(RootBeanDefinition bd, String beanName, BeanFactory owner, Constructor<?> ctor, Object... args) Subclasses can override this method, which is implemented to throw UnsupportedOperationException, if they can instantiate an object with the Method Injection specified in the given RootBeanDefinition. Instantiation should use the given constructor and parameters. | |
| setCurrentlyInvokedFactoryMethod | back to summary |
|---|---|
| public static void setCurrentlyInvokedFactoryMethod(Method method) Set the factory method currently being invoked or
| |