Class TopLevelClass.Default.ListOrNode

java.lang.Object
  extended byTopLevelClass.Default.Node
      extended byTopLevelClass.Default.ListOrNode
All Implemented Interfaces:
List/Node, TopLevelClass.Node
Enclosing class:
TopLevelClass.Default

public static class TopLevelClass.Default.ListOrNode
extends TopLevelClass.Default.Node
implements List/Node

An implementation of ListOrNode node.

Since:
notavaCC 1.0

Field Summary
static int ID
          The ID value of the type.
 
Constructor Summary
TopLevelClass.Default.ListOrNode(List/Node source)
          Constructs a instance with the child nodes given by source.getChildNodes() and source.
TopLevelClass.Default.ListOrNode(TopLevelClass.NodeInitializationParameters parameters, boolean compact)
          Constructs a instance with the child nodes given by parameters.
 
Method Summary
 void replaceChild(TopLevelClass.Node oldChild, TopLevelClass.Node newChild)
          Replaces the child node oldChild with newChild.
 
Methods inherited from class TopLevelClass.Default.Node
getChildNodes, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface TopLevelClass.Node
getChildNodes
 

Field Detail

ID

public static final int ID
The ID value of the type. This field is generated if the instance of this type may be included by the abstract syntx trees.

Since:
notavaCC 1.0
See Also:
TopLevelClass.createNode(int, TopLevelClass.NodeInitializationParameters),
Constructor Detail

TopLevelClass.Default.ListOrNode

public TopLevelClass.Default.ListOrNode(List/Node source)
Constructs a instance with the child nodes given by source.getChildNodes() and source.label(). List objects are copied.

Parameters:
source - the source.

TopLevelClass.Default.ListOrNode

public TopLevelClass.Default.ListOrNode(TopLevelClass.NodeInitializationParameters parameters,
                                        boolean compact)
Constructs a instance with the child nodes given by parameters.

Parameters:
parameters - the parameters for initialization.
compact - remove the children that are not labeled.
Method Detail

replaceChild

public void replaceChild(TopLevelClass.Node oldChild,
                         TopLevelClass.Node newChild)
Description copied from class: TopLevelClass.Default.Node
Replaces the child node oldChild with newChild.

This method replaces oldChild in getChildNodes() with newChild. Also, this method replaces the values returned by TopLevelClass.Type.label().

Overrides:
replaceChild in class TopLevelClass.Default.Node
Parameters:
oldChild - a replaced child node.
newChild - a child node to replace oldChild.