com.ibm.able.rules
Class AbleARLTreeNode
java.lang.Object
|
+--com.ibm.able.rules.AbleARLTreeNode
- All Implemented Interfaces:
- java.io.Serializable
- public class AbleARLTreeNode
- extends java.lang.Object
- implements java.io.Serializable
This class represents a node in the abstract syntax tree
created as a byproduct of parsing an ABLE Rule Language file using
the Antlr (AbleARLParser) parser. A tree structure made out of these
nodes is used to show the outline of the ARL ruleset in Eclipse.
- See Also:
- Serialized Form
Constructor Summary |
AbleARLTreeNode(antlr.Token theToken)
Create an ARL Tree node with line, column, text from the antlr Token |
AbleARLTreeNode(antlr.Token theToken,
java.lang.String theText)
Create an ARL Tree node and append theText to the token text |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
myParent
protected AbleARLTreeNode myParent
myTokenType
protected int myTokenType
myLine
protected int myLine
myColumn
protected int myColumn
myOffset
protected int myOffset
myLength
protected int myLength
myText
protected java.lang.String myText
numChars
protected int numChars
children
protected java.util.Vector children
AbleARLTreeNode
public AbleARLTreeNode(antlr.Token theToken)
- Create an ARL Tree node with line, column, text from the antlr Token
AbleARLTreeNode
public AbleARLTreeNode(antlr.Token theToken,
java.lang.String theText)
- Create an ARL Tree node and append theText to the token text
addChild
public void addChild(AbleARLTreeNode node)
addText
public void addText(java.lang.String theText)
setParent
public void setParent(AbleARLTreeNode theParent)
getParent
public java.lang.Object getParent()
- return the parent node or (null) if none
hasChildren
public boolean hasChildren()
getChildren
public java.lang.Object[] getChildren()
getLine
public int getLine()
getNumChars
public int getNumChars()
getLength
public int getLength()
setLength
public void setLength(int length)
setOffset
public void setOffset(int offset)
getOffset
public int getOffset()
toString
public java.lang.String toString()
- Return the text associated with this node
- Overrides:
toString
in class java.lang.Object
getTokenType
public int getTokenType()
displayString
public java.lang.String displayString()
- Return a formatted string of the ARL tree with this node as root
(C) Copyright IBM Corporation 1999, 2003