public abstract class AbstractChildElementIterator extends Object implements PostProcessor
This iterates over child elements, parsing them and calling
insertBean(BeanAssembler, Object, Element, Element)
.
There are two ways we can parse a tree of elements - have an external loop or let each parser iterate over its own children. Mule uses the first strategy, but some (most? all?) third party BDPs use the second. This processor lets us use third party beans inside the Mule framework.
So this is a very specialised parser that should only be used when trying to inter-operate with beans from third party packages which themselves control how their children are parsed.
Since for Mule beans the iteration over child elements (at least currently) is
done via MuleHierarchicalBeanDefinitionParserDelegate
the calling parser
needs to set the flag
MuleHierarchicalBeanDefinitionParserDelegate.MULE_NO_RECURSE
- this stops
the Mule recursion from working.
NOTE - IMHO (ac) the Mule approach was probably a mistake; this processor could be used as a way to slowly migrate the Mule code to the more common approach.
Constructor and Description |
---|
AbstractChildElementIterator(BeanAssemblerFactory beanAssemblerFactory,
PropertyConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
insertBean(BeanAssembler targetAssembler,
Object childBean,
Element parent,
Element child) |
void |
postProcess(org.springframework.beans.factory.xml.ParserContext context,
BeanAssembler assembler,
Element element) |
protected void |
processChildElement(org.springframework.beans.factory.xml.ParserContext context,
BeanAssembler assembler,
Element parent,
Element child) |
public AbstractChildElementIterator(BeanAssemblerFactory beanAssemblerFactory, PropertyConfiguration configuration)
public void postProcess(org.springframework.beans.factory.xml.ParserContext context, BeanAssembler assembler, Element element)
postProcess
in interface PostProcessor
protected void processChildElement(org.springframework.beans.factory.xml.ParserContext context, BeanAssembler assembler, Element parent, Element child)
protected abstract void insertBean(BeanAssembler targetAssembler, Object childBean, Element parent, Element child)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.