org.springframework.beans.factory.xml
Interface XmlBeanDefinitionParser

All Known Implementing Classes:
DefaultXmlBeanDefinitionParser

public interface XmlBeanDefinitionParser

Strategy interface for parsing XML bean definitions. Used by XmlBeanDefinitionReader for actually parsing a DOM document.

Instantiated per document to parse: Implementations can hold state in instance variables during the execution of the registerBeanDefinitions method, for example global settings that are defined for all bean definitions in the document.

Since:
18.12.2003
Author:
Juergen Hoeller
See Also:
XmlBeanDefinitionReader.setParserClass(java.lang.Class)

Method Summary
 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.
 

Method Detail

registerBeanDefinitions

public void registerBeanDefinitions(BeanDefinitionRegistry beanFactory,
                                    java.lang.ClassLoader beanClassLoader,
                                    org.w3c.dom.Document doc,
                                    Resource resource)
                             throws BeansException
Parse bean definitions from the given DOM document, and register them with the given bean factory.

Parameters:
beanFactory - the bean factory to register the bean definitions with
beanClassLoader - 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 document
resource - descriptor of the original XML resource (useful for displaying parse errors)
Throws:
BeansException - in case of parsing errors


Copyright (C) 2003-2004 The Spring Framework Project.