- All Superinterfaces:
StatementTree
,Tree
A tree node for a 'switch' statement.
For example:
switch ( expression ) { cases }
- Since:
- 9
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCases()
Returns the list of 'case' statements.Returns the expression on which this statement switches.Methods inherited from interface org.openjdk.nashorn.api.tree.Tree
accept, getEndPosition, getKind, getStartPosition
-
Method Details
-
getExpression
ExpressionTree getExpression()Returns the expression on which this statement switches.- Returns:
- the switch expression
-
getCases
Returns the list of 'case' statements.- Returns:
- the 'case' statements
-