revised RootBeanDefinition constructors

This commit is contained in:
Juergen Hoeller 2009-10-13 21:39:27 +00:00
parent e2af25b891
commit 3331f16ef7
1 changed files with 12 additions and 0 deletions

View File

@ -118,6 +118,7 @@ public class RootBeanDefinition extends AbstractBeanDefinition {
* using the given autowire mode. * using the given autowire mode.
* @param beanClass the class of the bean to instantiate * @param beanClass the class of the bean to instantiate
* @param autowireMode by name or type, using the constants in this interface * @param autowireMode by name or type, using the constants in this interface
* @deprecated as of Spring 3.0, in favor of {@link #setAutowireMode} usage
*/ */
public RootBeanDefinition(Class beanClass, int autowireMode) { public RootBeanDefinition(Class beanClass, int autowireMode) {
super(); super();
@ -147,6 +148,7 @@ public class RootBeanDefinition extends AbstractBeanDefinition {
* providing property values. * providing property values.
* @param beanClass the class of the bean to instantiate * @param beanClass the class of the bean to instantiate
* @param pvs the property values to apply * @param pvs the property values to apply
* @deprecated as of Spring 3.0, in favor of {@link #getPropertyValues} usage
*/ */
public RootBeanDefinition(Class beanClass, MutablePropertyValues pvs) { public RootBeanDefinition(Class beanClass, MutablePropertyValues pvs) {
super(null, pvs); super(null, pvs);
@ -180,6 +182,16 @@ public class RootBeanDefinition extends AbstractBeanDefinition {
setBeanClass(beanClass); setBeanClass(beanClass);
} }
/**
* Create a new RootBeanDefinition for a singleton,
* providing constructor arguments and property values.
* <p>Takes a bean class name to avoid eager loading of the bean class.
* @param beanClassName the name of the class to instantiate
*/
public RootBeanDefinition(String beanClassName) {
setBeanClassName(beanClassName);
}
/** /**
* Create a new RootBeanDefinition for a singleton, * Create a new RootBeanDefinition for a singleton,
* providing constructor arguments and property values. * providing constructor arguments and property values.