koala.dynamicjava.tree
Class LabeledStatement
java.lang.Object
|
+--koala.dynamicjava.tree.Node
|
+--koala.dynamicjava.tree.Statement
|
+--koala.dynamicjava.tree.LabeledStatement
- public class LabeledStatement
- extends Statement
This class represents the labeled statement nodes of the syntax tree
Field Summary |
static java.lang.String |
LABEL
The label property name |
static java.lang.String |
STATEMENT
The statement property name |
Constructor Summary |
LabeledStatement(java.lang.String label,
Node stat)
Creates a new while statement |
LabeledStatement(java.lang.String label,
Node stat,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
Creates a new while statement |
Methods inherited from class koala.dynamicjava.tree.Node |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getFilename, getProperties, getProperty, hasProperty, removePropertyChangeListener, removePropertyChangeListener, setBeginColumn, setBeginLine, setEndColumn, setEndLine, setFilename, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LABEL
public static final java.lang.String LABEL
- The label property name
STATEMENT
public static final java.lang.String STATEMENT
- The statement property name
LabeledStatement
public LabeledStatement(java.lang.String label,
Node stat)
- Creates a new while statement
- Parameters:
label
- the labelstat
- the statement- Throws:
java.lang.IllegalArgumentException
- if label is null or stat is null
LabeledStatement
public LabeledStatement(java.lang.String label,
Node stat,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
- Creates a new while statement
- Parameters:
label
- the labelstat
- the statementfn
- the filenamebl
- the begin linebc
- the begin columnel
- the end lineec
- the end column- Throws:
java.lang.IllegalArgumentException
- if label is null or stat is null
getLabel
public java.lang.String getLabel()
- Gets the label
setLabel
public void setLabel(java.lang.String s)
- Sets the label
- Throws:
java.lang.IllegalArgumentException
- if e is null
getStatement
public Node getStatement()
- Returns the statement
setStatement
public void setStatement(Node n)
- Sets the statement
- Throws:
java.lang.IllegalArgumentException
- if n is null
acceptVisitor
public java.lang.Object acceptVisitor(Visitor visitor)
- Allows a visitor to traverse the tree
- Overrides:
acceptVisitor
in class Node
- Parameters:
visitor
- the visitor to accept
Copyright © 2001 Stephane Hillion. All Rights Reserved.