public class SwitchStmt extends JumpStmt
| Constructor and Description |
|---|
SwitchStmt(Expr index,
Block defaultTarget,
Block[] targets,
int[] values)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
Block |
defaultTarget() |
Expr |
index() |
void |
setDefaultTarget(Block block) |
Block[] |
targets() |
int[] |
values() |
void |
visit(TreeVisitor visitor) |
void |
visitForceChildren(TreeVisitor visitor)
Visit the children of this node.
|
catchTargets, copyIntocleanupOnlyblock, cleanup, hasParent, key, parent, replaceWith, replaceWith, setKey, setParent, setValueNumber, toString, valueNumber, visitChildren, visitOnlypublic SwitchStmt(Expr index, Block defaultTarget, Block[] targets, int[] values)
index - The expression on which the switch is made.defaultTarget - The code to be executed if index is not contained in values.targets - The code to be executed for each value in values.values - The interesting values that index can have. That is, the
values of index in which a non-default target is executed.public Expr index()
public void setDefaultTarget(Block block)
public Block defaultTarget()
public Block[] targets()
public int[] values()
public void visitForceChildren(TreeVisitor visitor)
NodevisitForceChildren in class Nodepublic void visit(TreeVisitor visitor)