public class Production extends Node
Constructor and Description |
---|
Production(ProductionPattern pattern)
Creates a new production node.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(Node child)
Adds a child node.
|
Node |
getChildAt(int index)
Returns the child node with the specified index.
|
int |
getChildCount()
Returns the number of child nodes.
|
int |
getId()
Returns the production (pattern) id.
|
java.lang.String |
getName()
Returns the production node name.
|
ProductionPattern |
getPattern()
Returns the production pattern for this production.
|
java.lang.String |
toString()
Returns a string representation of this production.
|
addValue, addValues, addValues, getAllValues, getDescendantCount, getEndColumn, getEndLine, getParent, getStartColumn, getStartLine, getValue, getValueCount, printTo, printTo, removeAllValues
public Production(ProductionPattern pattern)
pattern
- the production patternpublic ProductionPattern getPattern()
public int getId()
public java.lang.String getName()
public int getChildCount()
getChildCount
in class Node
public Node getChildAt(int index)
getChildAt
in class Node
index
- the child index, starting at 0public void addChild(Node child)
child
- the child node to addpublic java.lang.String toString()
toString
in class java.lang.Object