|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.beans.factory.support.BeanDefinitionReaderUtils
public class BeanDefinitionReaderUtils
Utility methods that are useful for bean definition reader implementations. Mainly intended for internal use.
PropertiesBeanDefinitionReader
,
DefaultXmlBeanDefinitionParser
Field Summary | |
---|---|
static String |
GENERATED_BEAN_NAME_SEPARATOR
Separator for generated bean names. |
Constructor Summary | |
---|---|
BeanDefinitionReaderUtils()
|
Method Summary | |
---|---|
static AbstractBeanDefinition |
createBeanDefinition(String className,
String parent,
ConstructorArgumentValues cargs,
MutablePropertyValues pvs,
ClassLoader classLoader)
Create a new RootBeanDefinition or ChildBeanDefinition for the given class name, parent, constructor arguments, and property values. |
static String |
generateBeanName(AbstractBeanDefinition beanDefinition,
BeanDefinitionRegistry beanFactory,
boolean isInnerBean)
Generate a bean name for the given bean definition, unique within the given bean factory. |
static void |
registerBeanDefinition(BeanDefinitionHolder bdHolder,
BeanDefinitionRegistry beanFactory)
Register the given bean definition with the given bean factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String GENERATED_BEAN_NAME_SEPARATOR
Constructor Detail |
---|
public BeanDefinitionReaderUtils()
Method Detail |
---|
public static AbstractBeanDefinition createBeanDefinition(String className, String parent, ConstructorArgumentValues cargs, MutablePropertyValues pvs, ClassLoader classLoader) throws ClassNotFoundException
className
- the name of the bean class, if anyparent
- the name of the parent bean, if anycargs
- the constructor arguments, if anypvs
- the property values, if anyclassLoader
- the ClassLoader to use for loading bean classes
(can be null
to just register bean classes by name)
ClassNotFoundException
- if the bean class could not be loadedpublic static String generateBeanName(AbstractBeanDefinition beanDefinition, BeanDefinitionRegistry beanFactory, boolean isInnerBean) throws BeanDefinitionStoreException
beanDefinition
- the bean definition to generate a bean name forbeanFactory
- the bean factory that the definition is going to be
registered with (to check for existing bean names)isInnerBean
- whether the given bean definition will be registered
as inner bean or as top-level bean (allowing for special name generation
for inner beans versus top-level beans)
BeanDefinitionStoreException
- if no unique name can be generated
for the given bean definitionpublic static void registerBeanDefinition(BeanDefinitionHolder bdHolder, BeanDefinitionRegistry beanFactory) throws BeanDefinitionStoreException
bdHolder
- the bean definition including name and aliasesbeanFactory
- the bean factory to register with
BeanDefinitionStoreException
- if registration failed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |