NamespaceHandlers.
Parsing and decorating of individual Nodes is done via BeanDefinitionParser
and BeanDefinitionDecorator strategy interfaces, respectively.
Provides the registerBeanDefinitionParser and registerBeanDefinitionDecorator
methods for registering a BeanDefinitionParser or BeanDefinitionDecorator
to handle a specific element.
registerBeanDefinitionParser(String, BeanDefinitionParser), registerBeanDefinitionDecorator(String, BeanDefinitionDecorator)
| Modifier and Type | Field and Description |
|---|---|
| private final Map | attributeDecorators
Stores the |
| private final Map | decorators
Stores the |
| private final Map | parsers
Stores the |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public BeanDefinitionHolder | decorate(Node
the source element or attribute that is to be parsed node, BeanDefinitionHolder the current bean definition definition, ParserContext the object encapsulating the current state of the parsing process parserContext)Implements org. Node by delegating to the BeanDefinitionDecorator that
is registered to handle that Node.
|
| private BeanDefinitionDecorator | findDecoratorForNode(Node node, ParserContext parserContext)
Locates the |
| private BeanDefinitionParser | findParserForElement(Element element, ParserContext parserContext)
Locates the |
| public BeanDefinition | parse(Element
the element that is to be parsed into one or more element, ParserContext BeanDefinitionsthe object encapsulating the current state of the parsing process parserContext)Implements org. Element by delegating to the BeanDefinitionParser that is
registered for that Element.
|
| protected final void | registerBeanDefinitionDecorator(String elementName, BeanDefinitionDecorator dec)
Subclasses can call this to register the supplied |
| protected final void | registerBeanDefinitionDecoratorForAttribute(String attrName, BeanDefinitionDecorator dec)
Subclasses can call this to register the supplied |
| protected final void | registerBeanDefinitionParser(String elementName, BeanDefinitionParser parser)
Subclasses can call this to register the supplied |
| attributeDecorators | back to summary |
|---|---|
| private final Map<String, BeanDefinitionDecorator> attributeDecorators Stores the | |
| decorators | back to summary |
|---|---|
| private final Map<String, BeanDefinitionDecorator> decorators Stores the | |
| parsers | back to summary |
|---|---|
| private final Map<String, BeanDefinitionParser> parsers Stores the | |
| NamespaceHandlerSupport | back to summary |
|---|---|
| public NamespaceHandlerSupport() | |
| decorate | back to summary |
|---|---|
| public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) Implements org. Decorates the supplied
| |
| findDecoratorForNode | back to summary |
|---|---|
| private BeanDefinitionDecorator findDecoratorForNode(Node node, ParserContext parserContext) Locates the
| |
| findParserForElement | back to summary |
|---|---|
| private BeanDefinitionParser findParserForElement(Element element, ParserContext parserContext) Locates the
| |
| parse | back to summary |
|---|---|
| public BeanDefinition parse(Element element, ParserContext parserContext) Implements org. Parses the supplied
| |
| registerBeanDefinitionDecorator | back to summary |
|---|---|
| protected final void registerBeanDefinitionDecorator(String elementName, BeanDefinitionDecorator dec) Subclasses can call this to register the supplied | |
| registerBeanDefinitionDecoratorForAttribute | back to summary |
|---|---|
| protected final void registerBeanDefinitionDecoratorForAttribute(String attrName, BeanDefinitionDecorator dec) Subclasses can call this to register the supplied | |
| registerBeanDefinitionParser | back to summary |
|---|---|
| protected final void registerBeanDefinitionParser(String elementName, BeanDefinitionParser parser) Subclasses can call this to register the supplied | |