DefaultBeanDefinitionDocumentReader
for handling custom namespaces in a Spring XML configuration file.
Implementations are expected to return implementations of the
BeanDefinitionParser interface for custom top-level tags and
implementations of the BeanDefinitionDecorator interface for
custom nested tags.
The parser will call parse when it encounters a custom tag
directly under the <beans> tags and decorate when
it encounters a custom tag directly under a <bean> tag.
Developers writing their own custom element extensions typically will
not implement this interface directly, but rather make use of the provided
NamespaceHandlerSupport class.
DefaultBeanDefinitionDocumentReader, NamespaceHandlerResolver
| Modifier and Type | Method and Description |
|---|---|
| public BeanDefinitionHolder | Returns: the decorated definition (to be registered in the BeanFactory), or simply the original bean definition if no decoration is required. Anull value is strictly speaking invalid, but will be leniently
treated like the case where the original bean definition gets returned.the source element or attribute that is to be parsed source, BeanDefinitionHolder the current bean definition definition, ParserContext the object encapsulating the current state of the parsing process parserContext)Parse the specified |
| public void | init()
Invoked by the |
| public BeanDefinition | Returns: the primaryBeanDefinition (can be null as explained above)the element that is to be parsed into one or more element, ParserContext BeanDefinitionsthe object encapsulating the current state of the parsing process parserContext)Parse the specified |
| decorate | back to summary |
|---|---|
| public BeanDefinitionHolder decorate(Node source, BeanDefinitionHolder definition, ParserContext parserContext) Parse the specified The Implementations may choose to return a completely new definition,
which will replace the original definition in the resulting
The supplied
| |
| init | back to summary |
|---|---|
| public void init() Invoked by the | |
| parse | back to summary |
|---|---|
| public BeanDefinition parse(Element element, ParserContext parserContext) Parse the specified Implementations should return the primary Implementations may return
| |