net.groboclown.xml.xdstates.v1.impl
Class MacroBuilder

java.lang.Object
  |
  +--net.groboclown.xml.xdstates.v1.impl.MacroBuilder
All Implemented Interfaces:
ISetBuilder

public class MacroBuilder
extends Object
implements ISetBuilder

Adds new classes to the builder lists.

Version:
Alpha 0.9.0 - JDK 1.0+
Author:
Matt Albrecht

Inner Class Summary
protected static class MacroBuilder.MacroSet
           
protected static class MacroBuilder.MNodeBuilder
           
protected static class MacroBuilder.MNodeSet
           
protected static class MacroBuilder.MSubTreeBuilder
           
protected static class MacroBuilder.MSubTreeItem
          This needs to be known by the MacroPrototypeBuilder.
 
Field Summary
private static String NAME_NODE_TAG
           
static String NODE_TAG_NAME
           
static String SUBTREE_TAG_NAME
           
static String TAG_NAME
           
 
Constructor Summary
MacroBuilder(ISetBuilderMap map)
           
 
Method Summary
 IItem createItem(String tagName, IAttribute[] attributes, String text, IItem[] children, IAttributeMap attrMap, ISetBuilderMap setBuilderMap, IInputStreamGenerator inputStreamGen)
          The builder will create a new IItem to be placed into the tree, as a child of the given parent.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

TAG_NAME

public static final String TAG_NAME

SUBTREE_TAG_NAME

public static final String SUBTREE_TAG_NAME

NODE_TAG_NAME

public static final String NODE_TAG_NAME

NAME_NODE_TAG

private static final String NAME_NODE_TAG
Constructor Detail

MacroBuilder

public MacroBuilder(ISetBuilderMap map)
Method Detail

createItem

public IItem createItem(String tagName,
                        IAttribute[] attributes,
                        String text,
                        IItem[] children,
                        IAttributeMap attrMap,
                        ISetBuilderMap setBuilderMap,
                        IInputStreamGenerator inputStreamGen)
The builder will create a new IItem to be placed into the tree, as a child of the given parent.
Specified by:
createItem in interface ISetBuilder
Parameters:
tagName - the tag name from where the item was read.
attributes - the attributes associated with the tag.
text - the plain text inside the tag.
children - all the defined children elements.
attrMap - stores the global IAttributeModule -> name mappings.
setBuilderMap - stores the global ISetBuilder -> tag name mappings.
inputStreamGen - if an external resource needs to be read, use this generator to create the new input stream.
Returns:
an IItem instance. It must be either an IItem or ISet.


Written under the LGPL