ca.ubc.cs.elide.nodes
Class ChildBearingNode

java.lang.Object
  |
  +--ca.ubc.cs.elide.nodes.ParseNode
        |
        +--ca.ubc.cs.elide.nodes.ChildBearingNode
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
ModifierBearingNode, PackageNode, StartNode

public abstract class ChildBearingNode
extends ParseNode

ChildBearingNode is an abstract class representing nodes which can act as ancestors of child nodes in the AST.

See Also:
Serialized Form

Constructor Summary
ChildBearingNode()
           
ChildBearingNode(java.lang.String name)
           
 
Method Summary
 void add(int index, ParseNode node)
          Adds a child to the children of this ChildBearingNode, at the index specified.
 void add(ParseNode node)
          Adds a child to the children of this ChildBearingNode
 void addTransform(TransformNode node)
          Adds a transformation to this ChildBearingNode, and registers this transformation.
 java.lang.Object clone()
          Returns a deep copy of this ChildBearingNode object.
 java.util.List getChildren()
          Returns all ParseNodes which are children of this ChildBearingNode, as a List.
 void remove(ParseNode node)
           
 
Methods inherited from class ca.ubc.cs.elide.nodes.ParseNode
findType, get, getComment, getDeclaringClass, getName, getPackage, getParent, getRoot, put, registerType, setComment, setName, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChildBearingNode

public ChildBearingNode()

ChildBearingNode

public ChildBearingNode(java.lang.String name)
Method Detail

add

public void add(ParseNode node)
Adds a child to the children of this ChildBearingNode

add

public void add(int index,
                ParseNode node)
Adds a child to the children of this ChildBearingNode, at the index specified.

addTransform

public void addTransform(TransformNode node)
Adds a transformation to this ChildBearingNode, and registers this transformation. Has the effect of adding the keyword associated with node to the current node in the base code.

remove

public void remove(ParseNode node)

getChildren

public java.util.List getChildren()
Returns all ParseNodes which are children of this ChildBearingNode, as a List.

clone

public java.lang.Object clone()
Returns a deep copy of this ChildBearingNode object.
Overrides:
clone in class ParseNode