koala.dynamicjava.tree
Class SwitchStatement
java.lang.Object
|
+--koala.dynamicjava.tree.Node
|
+--koala.dynamicjava.tree.Statement
|
+--koala.dynamicjava.tree.SwitchStatement
- public class SwitchStatement
- extends Statement
This class represents the switch statement nodes of the syntax tree
Field Summary |
static java.lang.String |
BINDINGS
The bindings property name |
static java.lang.String |
SELECTOR
The selector property name |
Constructor Summary |
SwitchStatement(Expression sel,
java.util.List cases,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
Creates a new switch 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 |
SELECTOR
public static final java.lang.String SELECTOR
- The selector property name
BINDINGS
public static final java.lang.String BINDINGS
- The bindings property name
SwitchStatement
public SwitchStatement(Expression sel,
java.util.List cases,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
- Creates a new switch statement
- Parameters:
sel
- the selectorcases
- the case bindings (SwitchBlocks)fn
- the filenamebl
- the begin linebc
- the begin columnel
- the end lineec
- the end column- Throws:
java.lang.IllegalArgumentException
- if sel is null or cases is null
getSelector
public Expression getSelector()
- Gets the selector
setSelector
public void setSelector(Expression e)
- Sets the selector
- Throws:
java.lang.IllegalArgumentException
- if e is null
getBindings
public java.util.List getBindings()
- Returns the 'case' bindings
setBindings
public void setBindings(java.util.List l)
- Sets the bindings
- Throws:
java.lang.IllegalArgumentException
- if e 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.