| java.lang.Object org.springframework.beans.factory.support.ConstructorResolver
ConstructorResolver | public ConstructorResolver(AbstractBeanFactory beanFactory, InstantiationStrategy instantiationStrategy)(Code) | | Create a new ConstructorResolver for the given factory and instantiation strategy.
Parameters: beanFactory - the BeanFactory to work with Parameters: instantiationStrategy - the instantiate strategy for creating bean instances |
autowireConstructor | protected BeanWrapper autowireConstructor(String beanName, RootBeanDefinition mbd, Constructor chosenCtor)(Code) | | "autowire constructor" (with constructor arguments by type) behavior.
Also applied if explicit constructor argument values are specified,
matching all remaining arguments with beans from the bean factory.
This corresponds to constructor injection: In this mode, a Spring
bean factory is able to host components that expect constructor-based
dependency resolution.
Parameters: beanName - the name of the bean Parameters: mbd - the merged bean definition for the bean Parameters: chosenCtor - a pre-chosen Constructor (or null if none) a BeanWrapper for the new instance |
findAutowireCandidates | abstract protected Map findAutowireCandidates(String beanName, Class requiredType) throws BeansException(Code) | | Find bean instances that match the required type.
Called during autowiring for the specified bean.
If a subclass cannot obtain information about bean names by type,
a corresponding exception should be thrown.
Parameters: beanName - the name of the bean that is about to be wired Parameters: requiredType - the type of the autowired constructor argument a Map of candidate names and candidate instances that matchthe required type (never null ) throws: BeansException - in case of errors See Also: ConstructorResolver.autowireConstructor |
instantiateUsingFactoryMethod | public BeanWrapper instantiateUsingFactoryMethod(String beanName, RootBeanDefinition mbd, Object[] explicitArgs)(Code) | | Instantiate the bean using a named factory method. The method may be static, if the
bean definition parameter specifies a class, rather than a "factory-bean", or
an instance variable on a factory object itself configured using Dependency Injection.
Implementation requires iterating over the static or instance methods with the
name specified in the RootBeanDefinition (the method may be overloaded) and trying
to match with the parameters. We don't have the types attached to constructor args,
so trial and error is the only way to go here. The explicitArgs array may contain
argument values passed in programmatically via the corresponding getBean method.
Parameters: beanName - the name of the bean Parameters: mbd - the merged bean definition for the bean Parameters: explicitArgs - argument values passed in programmatically via the getBeanmethod, or null if none (-> use constructor argument values from bean definition) a BeanWrapper for the new instance |
|
|