Class AbstractChildElementIterator

  extended by org.mule.config.spring.parsers.processors.AbstractChildElementIterator
All Implemented Interfaces:
Direct Known Subclasses:

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 Summary
AbstractChildElementIterator(BeanAssemblerFactory beanAssemblerFactory, PropertyConfiguration configuration)
Method Summary
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)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public AbstractChildElementIterator(BeanAssemblerFactory beanAssemblerFactory,
                                    PropertyConfiguration configuration)
Method Detail


public void postProcess(org.springframework.beans.factory.xml.ParserContext context,
                        BeanAssembler assembler,
                        Element element)
Specified by:
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-2012 MuleSoft, Inc.. All Rights Reserved.