|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser
Default implementation of the XmlBeanDefinitionParser interface. Parses bean definitions according to the "spring-beans" DTD.
Field Summary | |
static java.lang.String |
AUTOWIRE_ATTRIBUTE
|
static java.lang.String |
AUTOWIRE_AUTODETECT_VALUE
|
static java.lang.String |
AUTOWIRE_BY_NAME_VALUE
|
static java.lang.String |
AUTOWIRE_BY_TYPE_VALUE
|
static java.lang.String |
AUTOWIRE_CONSTRUCTOR_VALUE
|
static java.lang.String |
BEAN_ELEMENT
|
static java.lang.String |
BEAN_NAME_DELIMITERS
|
static java.lang.String |
BEAN_REF_ATTRIBUTE
|
static java.lang.String |
CLASS_ATTRIBUTE
|
static java.lang.String |
CONSTRUCTOR_ARG_ELEMENT
|
static java.lang.String |
DEFAULT_AUTOWIRE_ATTRIBUTE
|
static java.lang.String |
DEFAULT_DEPENDENCY_CHECK_ATTRIBUTE
|
static java.lang.String |
DEFAULT_LAZY_INIT_ATTRIBUTE
|
static java.lang.String |
DEFAULT_VALUE
|
static java.lang.String |
DEPENDENCY_CHECK_ALL_ATTRIBUTE_VALUE
|
static java.lang.String |
DEPENDENCY_CHECK_ATTRIBUTE
|
static java.lang.String |
DEPENDENCY_CHECK_OBJECTS_ATTRIBUTE_VALUE
|
static java.lang.String |
DEPENDENCY_CHECK_SIMPLE_ATTRIBUTE_VALUE
|
static java.lang.String |
DEPENDS_ON_ATTRIBUTE
|
static java.lang.String |
DESCRIPTION_ELEMENT
|
static java.lang.String |
DESTROY_METHOD_ATTRIBUTE
|
static java.lang.String |
ENTRY_ELEMENT
|
static java.lang.String |
ID_ATTRIBUTE
|
static java.lang.String |
IDREF_ELEMENT
|
static java.lang.String |
INDEX_ATTRIBUTE
|
static java.lang.String |
INIT_METHOD_ATTRIBUTE
|
static java.lang.String |
KEY_ATTRIBUTE
|
static java.lang.String |
LAZY_INIT_ATTRIBUTE
|
static java.lang.String |
LIST_ELEMENT
|
static java.lang.String |
LOCAL_REF_ATTRIBUTE
|
protected org.apache.commons.logging.Log |
logger
|
static java.lang.String |
MAP_ELEMENT
|
static java.lang.String |
NAME_ATTRIBUTE
|
static java.lang.String |
NULL_ELEMENT
|
static java.lang.String |
PARENT_ATTRIBUTE
|
static java.lang.String |
PROP_ELEMENT
|
static java.lang.String |
PROPERTY_ELEMENT
|
static java.lang.String |
PROPS_ELEMENT
|
static java.lang.String |
REF_ELEMENT
|
static java.lang.String |
SET_ELEMENT
|
static java.lang.String |
SINGLETON_ATTRIBUTE
|
static java.lang.String |
TRUE_VALUE
Value of a T/F attribute that represents true. |
static java.lang.String |
TYPE_ATTRIBUTE
|
static java.lang.String |
VALUE_ELEMENT
|
Constructor Summary | |
DefaultXmlBeanDefinitionParser()
|
Method Summary | |
protected int |
getAutowireMode(java.lang.String att)
|
protected java.lang.ClassLoader |
getBeanClassLoader()
|
protected BeanDefinitionRegistry |
getBeanFactory()
|
protected java.util.List |
getChildElementsByTagName(org.w3c.dom.Element mapEle,
java.lang.String elementName)
Don't use the horrible DOM API to get child elements: Get an element's children with a given element name |
protected ConstructorArgumentValues |
getConstructorArgSubElements(java.lang.String beanName,
org.w3c.dom.Element beanEle)
Parse constructor argument subelements of the given bean element. |
protected java.lang.String |
getDefaultAutowire()
|
protected java.lang.String |
getDefaultDependencyCheck()
|
protected java.lang.String |
getDefaultLazyInit()
|
protected int |
getDependencyCheck(java.lang.String att)
|
protected java.util.List |
getList(org.w3c.dom.Element collectionEle,
java.lang.String beanName)
|
protected java.util.Map |
getMap(org.w3c.dom.Element mapEle,
java.lang.String beanName)
|
protected java.lang.Object |
getPropertyValue(org.w3c.dom.Element ele,
java.lang.String beanName)
Get the value of a property element. |
protected MutablePropertyValues |
getPropertyValueSubElements(java.lang.String beanName,
org.w3c.dom.Element beanEle)
Parse property value subelements of the given bean element. |
protected java.util.Properties |
getProps(org.w3c.dom.Element propsEle,
java.lang.String beanName)
|
protected java.util.Set |
getSet(org.w3c.dom.Element collectionEle,
java.lang.String beanName)
|
protected java.lang.String |
getTextValue(org.w3c.dom.Element ele,
java.lang.String beanName)
Make the horrible DOM API slightly more bearable: get the text value we know this element contains |
protected void |
loadBeanDefinition(org.w3c.dom.Element ele)
Parse an element definition: We know this is a BEAN element. |
protected AbstractBeanDefinition |
parseBeanDefinition(org.w3c.dom.Element ele,
java.lang.String beanName)
Parse a standard bean definition. |
protected void |
parseConstructorArgElement(java.lang.String beanName,
ConstructorArgumentValues cargs,
org.w3c.dom.Element ele)
Parse a constructor-arg element. |
protected void |
parsePropertyElement(java.lang.String beanName,
MutablePropertyValues pvs,
org.w3c.dom.Element ele)
Parse a property element. |
protected java.lang.Object |
parsePropertySubelement(org.w3c.dom.Element ele,
java.lang.String beanName)
Parse a value, ref or collection subelement of a property element |
void |
registerBeanDefinitions(BeanDefinitionRegistry beanFactory,
java.lang.ClassLoader beanClassLoader,
org.w3c.dom.Document doc,
Resource resource)
Parse bean definitions from the given DOM document, and register them 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 java.lang.String BEAN_NAME_DELIMITERS
public static final java.lang.String TRUE_VALUE
public static final java.lang.String DEFAULT_VALUE
public static final java.lang.String DEFAULT_LAZY_INIT_ATTRIBUTE
public static final java.lang.String DEFAULT_DEPENDENCY_CHECK_ATTRIBUTE
public static final java.lang.String DEFAULT_AUTOWIRE_ATTRIBUTE
public static final java.lang.String BEAN_ELEMENT
public static final java.lang.String DESCRIPTION_ELEMENT
public static final java.lang.String CLASS_ATTRIBUTE
public static final java.lang.String PARENT_ATTRIBUTE
public static final java.lang.String ID_ATTRIBUTE
public static final java.lang.String NAME_ATTRIBUTE
public static final java.lang.String SINGLETON_ATTRIBUTE
public static final java.lang.String DEPENDS_ON_ATTRIBUTE
public static final java.lang.String INIT_METHOD_ATTRIBUTE
public static final java.lang.String DESTROY_METHOD_ATTRIBUTE
public static final java.lang.String CONSTRUCTOR_ARG_ELEMENT
public static final java.lang.String INDEX_ATTRIBUTE
public static final java.lang.String TYPE_ATTRIBUTE
public static final java.lang.String PROPERTY_ELEMENT
public static final java.lang.String REF_ELEMENT
public static final java.lang.String IDREF_ELEMENT
public static final java.lang.String BEAN_REF_ATTRIBUTE
public static final java.lang.String LOCAL_REF_ATTRIBUTE
public static final java.lang.String LIST_ELEMENT
public static final java.lang.String SET_ELEMENT
public static final java.lang.String MAP_ELEMENT
public static final java.lang.String KEY_ATTRIBUTE
public static final java.lang.String ENTRY_ELEMENT
public static final java.lang.String VALUE_ELEMENT
public static final java.lang.String NULL_ELEMENT
public static final java.lang.String PROPS_ELEMENT
public static final java.lang.String PROP_ELEMENT
public static final java.lang.String LAZY_INIT_ATTRIBUTE
public static final java.lang.String DEPENDENCY_CHECK_ATTRIBUTE
public static final java.lang.String DEPENDENCY_CHECK_ALL_ATTRIBUTE_VALUE
public static final java.lang.String DEPENDENCY_CHECK_SIMPLE_ATTRIBUTE_VALUE
public static final java.lang.String DEPENDENCY_CHECK_OBJECTS_ATTRIBUTE_VALUE
public static final java.lang.String AUTOWIRE_ATTRIBUTE
public static final java.lang.String AUTOWIRE_BY_NAME_VALUE
public static final java.lang.String AUTOWIRE_BY_TYPE_VALUE
public static final java.lang.String AUTOWIRE_CONSTRUCTOR_VALUE
public static final java.lang.String AUTOWIRE_AUTODETECT_VALUE
protected final org.apache.commons.logging.Log logger
Constructor Detail |
public DefaultXmlBeanDefinitionParser()
Method Detail |
public void registerBeanDefinitions(BeanDefinitionRegistry beanFactory, java.lang.ClassLoader beanClassLoader, org.w3c.dom.Document doc, Resource resource)
XmlBeanDefinitionParser
registerBeanDefinitions
in interface XmlBeanDefinitionParser
beanFactory
- the bean factory to register the bean definitions withbeanClassLoader
- class loader to use for bean classes
(null suggests to not load bean classes but just register bean definitions
with class names, for example when just registering beans in a registry
but not actually instantiating them in a factory)doc
- the DOM documentresource
- descriptor of the original XML resource
(useful for displaying parse errors)protected BeanDefinitionRegistry getBeanFactory()
protected java.lang.ClassLoader getBeanClassLoader()
protected java.lang.String getDefaultLazyInit()
protected java.lang.String getDefaultDependencyCheck()
protected java.lang.String getDefaultAutowire()
protected void loadBeanDefinition(org.w3c.dom.Element ele)
protected AbstractBeanDefinition parseBeanDefinition(org.w3c.dom.Element ele, java.lang.String beanName)
protected ConstructorArgumentValues getConstructorArgSubElements(java.lang.String beanName, org.w3c.dom.Element beanEle) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected MutablePropertyValues getPropertyValueSubElements(java.lang.String beanName, org.w3c.dom.Element beanEle)
protected void parseConstructorArgElement(java.lang.String beanName, ConstructorArgumentValues cargs, org.w3c.dom.Element ele) throws org.w3c.dom.DOMException, java.lang.ClassNotFoundException
org.w3c.dom.DOMException
java.lang.ClassNotFoundException
protected void parsePropertyElement(java.lang.String beanName, MutablePropertyValues pvs, org.w3c.dom.Element ele) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
protected java.lang.Object getPropertyValue(org.w3c.dom.Element ele, java.lang.String beanName)
ele
- property elementprotected java.lang.Object parsePropertySubelement(org.w3c.dom.Element ele, java.lang.String beanName)
ele
- subelement of property element; we don't know which yetprotected java.util.List getList(org.w3c.dom.Element collectionEle, java.lang.String beanName)
protected java.util.Set getSet(org.w3c.dom.Element collectionEle, java.lang.String beanName)
protected java.util.Map getMap(org.w3c.dom.Element mapEle, java.lang.String beanName)
protected java.util.List getChildElementsByTagName(org.w3c.dom.Element mapEle, java.lang.String elementName)
protected java.util.Properties getProps(org.w3c.dom.Element propsEle, java.lang.String beanName)
protected java.lang.String getTextValue(org.w3c.dom.Element ele, java.lang.String beanName)
protected int getDependencyCheck(java.lang.String att)
protected int getAutowireMode(java.lang.String att)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |