1 16 17 package org.springframework.beans.factory.support; 18 19 import org.springframework.beans.MutablePropertyValues; 20 import org.springframework.beans.factory.config.ConstructorArgumentValues; 21 22 35 public class RootBeanDefinition extends AbstractBeanDefinition { 36 37 48 public RootBeanDefinition() { 49 super(); 50 } 51 52 56 public RootBeanDefinition(Class beanClass) { 57 super(); 58 setBeanClass(beanClass); 59 } 60 61 66 public RootBeanDefinition(Class beanClass, boolean singleton) { 67 super(); 68 setBeanClass(beanClass); 69 setSingleton(singleton); 70 } 71 72 78 public RootBeanDefinition(Class beanClass, int autowireMode) { 79 super(); 80 setBeanClass(beanClass); 81 setAutowireMode(autowireMode); 82 } 83 84 92 public RootBeanDefinition(Class beanClass, int autowireMode, boolean dependencyCheck) { 93 super(); 94 setBeanClass(beanClass); 95 setAutowireMode(autowireMode); 96 if (dependencyCheck && getResolvedAutowireMode() != AUTOWIRE_CONSTRUCTOR) { 97 setDependencyCheck(RootBeanDefinition.DEPENDENCY_CHECK_OBJECTS); 98 } 99 } 100 101 107 public RootBeanDefinition(Class beanClass, MutablePropertyValues pvs) { 108 super(null, pvs); 109 setBeanClass(beanClass); 110 } 111 112 119 public RootBeanDefinition(Class beanClass, MutablePropertyValues pvs, boolean singleton) { 120 super(null, pvs); 121 setBeanClass(beanClass); 122 setSingleton(singleton); 123 } 124 125 132 public RootBeanDefinition(Class beanClass, ConstructorArgumentValues cargs, MutablePropertyValues pvs) { 133 super(cargs, pvs); 134 setBeanClass(beanClass); 135 } 136 137 145 public RootBeanDefinition(String beanClassName, ConstructorArgumentValues cargs, MutablePropertyValues pvs) { 146 super(cargs, pvs); 147 setBeanClassName(beanClassName); 148 } 149 150 155 public RootBeanDefinition(RootBeanDefinition original) { 156 super(original); 157 } 158 159 160 public boolean equals(Object other) { 161 return (this == other || (other instanceof RootBeanDefinition && super.equals(other))); 162 } 163 164 public String toString() { 165 return "Root bean: " + super.toString(); 166 } 167 168 } 169 | Popular Tags |