|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.percederberg.mib.asn1.node.Node
|
+--net.percederberg.mib.asn1.node.Production
This class represents a production node in the parse tree. A production node is equivalent to a grammar rule (or production), sometimes also referred to as a syntesized node.
| Fields inherited from class net.percederberg.mib.asn1.node.Node |
kind |
| Constructor Summary | |
Production(int kind)
Create a new node without children or parent. |
|
Production(int kind,
Node parent)
Create a new node with the given parent, but without children. |
|
| Method Summary | |
void |
addChild(Node child)
Adds a child to the node. |
Node |
childAfter(Node child)
Returns the child coming after the given child. |
Node |
childAt(int index)
Returns a child with the given index. |
Node |
childOfType(int type)
Returns the first child of the given type. |
int |
children()
Returns the number of children to the current node. |
int |
childrenOfType(int type)
Returns the number of children of a given type to the current node. |
int |
firstColumn()
Finds the first column for the node. |
int |
firstLine()
Finds the first line for the node. |
int |
lastColumn()
Finds the last column for the node. |
int |
lastLine()
Finds the last line for the node. |
| Methods inherited from class net.percederberg.mib.asn1.node.Node |
apply, getParent, isAncestor, isParent, isType, setParent, toName, toName, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Production(int kind)
kind - the kind of node (a node constant value)
public Production(int kind,
Node parent)
kind - the kind of nodeparent - the node parent| Method Detail |
public void addChild(Node child)
child - the child to addpublic Node childAfter(Node child)
childAfter in class Nodechild - a child nodepublic Node childAt(int index)
childAt in class Nodeindex - a child index, from 0 to children() - 1public Node childOfType(int type)
childOfType in class Nodetype - a node type constant valuepublic int children()
children in class Nodepublic int childrenOfType(int type)
childrenOfType in class Nodetype - the type numberpublic int firstLine()
firstLine in class Nodepublic int firstColumn()
firstColumn in class Nodepublic int lastLine()
lastLine in class Nodepublic int lastColumn()
lastColumn in class Node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||