Interface ElementFactoryProvider


  • public interface ElementFactoryProvider
    Provider of ElementFactorys. A configuration node which implements this interface is able to choose the source of subordinate node instances dynamically. This feature is needed when the classes which represent XML sub-elements are not known at compile time, e.g. when they depend on other configuration parameters.
    Author:
    Uwe Finke
    • Method Detail

      • getFactory

        ElementFactory getFactory​(String tagName,
                                  Map<String,​String> attributes)
                           throws Exception
        Returns an ElementFactory to the parser. If the given tag or attributes are not supported by the implementing class, the result may be null, so that the parser tries to create a node instance in the standard way.
        Parameters:
        tagName - XML tag
        attributes - map of XML attributes
        Returns:
        element factory
        Throws:
        Exception - any exception