ABLE 2.0.0 07/02/2003 10:25:01

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

Field Summary
protected  java.util.Vector children
           
protected  int myColumn
           
protected  int myLength
           
protected  int myLine
           
protected  int myOffset
           
protected  AbleARLTreeNode myParent
           
protected  java.lang.String myText
           
protected  int myTokenType
           
protected  int numChars
           
 
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
 
Method Summary
 void addChild(AbleARLTreeNode node)
           
 void addText(java.lang.String theText)
           
 java.lang.String displayString()
          Return a formatted string of the ARL tree with this node as root
 java.lang.Object[] getChildren()
           
 int getLength()
           
 int getLine()
           
 int getNumChars()
           
 int getOffset()
           
 java.lang.Object getParent()
          return the parent node or (null) if none
 int getTokenType()
           
 boolean hasChildren()
           
 void setLength(int length)
           
 void setOffset(int offset)
           
 void setParent(AbleARLTreeNode theParent)
           
 java.lang.String toString()
          Return the text associated with this node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

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
Method Detail

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

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003