public interface Switch extends CompoundStmt
Switch is an immutable representation of a Java
switch statement. Such a statement has an expression which
is evaluated to determine where to branch to, an a list of labels
and block statements which are conditionally evaluated. One of the
labels, rather than having a constant expression, may be lablled
default.Term.Instance| Modifier and Type | Method and Description |
|---|---|
java.util.List<SwitchElement> |
elements()
List of switch elements: case statements or blocks.
|
Switch |
elements(java.util.List<SwitchElement> elements)
Set the list of switch elements: case statements or blocks.
|
Expr |
expr()
The expression on which to switch.
|
Switch |
expr(Expr expr)
Set the expression on which to switch.
|
exceptions, exceptions, reachable, reachabledel, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdgeaddDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitListExpr expr()
java.util.List<SwitchElement> elements()
SwitchElement.Switch elements(java.util.List<SwitchElement> elements)
elements - A list of SwitchElement.