ABLE 2.3.0 07/13/2005 14:21:00

com.ibm.able.rules
Class AbleARLTreeNode

java.lang.Object
  extended bycom.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  AbleParException myParException
           
protected  java.lang.String myText
           
protected  int myTokenType
           
protected  int numChars
           
 
Constructor Summary
AbleARLTreeNode(java.lang.String theText)
          Create an ARL Tree node with specified text (and no Token info)
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
 AbleParException getParException()
          Retrieve the parse exception info (only found on root node)
 int getTokenType()
           
 boolean hasChildren()
           
 void setLength(int length)
           
 void setOffset(int offset)
           
 void setParent(AbleARLTreeNode theParent)
           
 void setParException(AbleParException theException)
          Set the parse error info (for use, only on the root node)
 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

myParException

protected AbleParException myParException
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


AbleARLTreeNode

public AbleARLTreeNode(java.lang.String theText)
Create an ARL Tree node with specified text (and no Token info)

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


getTokenType

public int getTokenType()

displayString

public java.lang.String displayString()
Return a formatted string of the ARL tree with this node as root


setParException

public void setParException(AbleParException theException)
Set the parse error info (for use, only on the root node)


getParException

public AbleParException getParException()
Retrieve the parse exception info (only found on root node)


ABLE 2.3.0 07/13/2005 14:21:00

(C) Copyright IBM Corporation 1999, 2005