public class Switch extends BranchStatement implements ExpressionContainer, VariableScope, TypeScope
| Modifier and Type | Field and Description | 
|---|---|
protected ImmutableArray<Branch> | 
branches
Branches. 
 | 
protected Expression | 
expression
Expression. 
 | 
| Constructor and Description | 
|---|
Switch()
Switch. 
 | 
Switch(Expression e)
Switch. 
 | 
Switch(Expression e,
      Branch[] branches)
Switch. 
 | 
Switch(ExtList children)
Switch. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Branch | 
getBranchAt(int index)  | 
int | 
getBranchCount()
Get the number of branches in this container. 
 | 
ImmutableArray<Branch> | 
getBranchList()  | 
ProgramElement | 
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
      child array 
 | 
int | 
getChildCount()
Returns the number of children of this node. 
 | 
Expression | 
getExpression()
Get expression. 
 | 
Expression | 
getExpressionAt(int index)  | 
int | 
getExpressionCount()
Get the number of expressions in this container. 
 | 
void | 
prettyPrint(PrettyPrinter p)
Pretty printing the source element. 
 | 
void | 
visit(Visitor v)
calls the corresponding method of a visitor in order to
 perform some action/transformation on this element 
 | 
compatibleBlockSize, computeHashCode, equals, equalsModRenaming, getArrayPos, match, matchChildrengetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetComments, matchequalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getPositionInfo, getRelativePosition, getStartPositionprotected final ImmutableArray<Branch> branches
protected final Expression expression
public Switch()
public Switch(Expression e)
e - an expression.public Switch(Expression e, Branch[] branches)
e - an expression.branches - a branch arraypublic Switch(ExtList children)
children - a list with all childrenpublic int getChildCount()
getChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
                 of boundspublic int getExpressionCount()
getExpressionCount in interface ExpressionContainerpublic Expression getExpressionAt(int index)
getExpressionAt in interface ExpressionContainerpublic Expression getExpression()
public int getBranchCount()
getBranchCount in class BranchStatementpublic Branch getBranchAt(int index)
getBranchAt in class BranchStatementpublic ImmutableArray<Branch> getBranchList()
public void visit(Visitor v)
visit in interface SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElementprettyPrint in interface SourceElementprettyPrint in class JavaProgramElementp - a pretty printer.java.io.IOException - occasionally thrown.