|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | 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.
Field Summary |
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 parentMethod Detail |
public void addChild(Node child)
child
- the child to addpublic Node childAfter(Node child)
childAfter
in class Node
child
- a child node
public Node childAt(int index)
childAt
in class Node
index
- a child index, from 0 to children() - 1
public Node childOfType(int type)
childOfType
in class Node
type
- a node type constant value
public int children()
children
in class Node
public int childrenOfType(int type)
childrenOfType
in class Node
type
- the type number
public int firstLine()
firstLine
in class Node
public int firstColumn()
firstColumn
in class Node
public int lastLine()
lastLine
in class Node
public int lastColumn()
lastColumn
in class Node
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |