case in a switch statement or expression.
For example:
case expression :
statements
default :
statements
| Modifier and Type | Class and Description |
|---|---|
| public static enum | CaseTree.
The syntactic form of this case:
|
| Modifier and Type | Method and Description |
|---|---|
| public default Tree | Returns: case value or nullFor case with kind CaseKind#RULE, returns the statement or expression after the arrow. |
| public default CaseTree. | |
| public ExpressionTree | Returns: the expression for the case, or null
Deprecated
Please use
getExpressions().
Returns the expression for the case, or
|
| public List | |
| public ExpressionTree | |
| public List | |
| public List | Returns: the statements labeled by the case or nullFor case with kind CaseKind#STATEMENT, returns the statements labeled by the case. |
| getBody | back to summary |
|---|---|
| public default Tree getBody() For case with kind CaseKind#RULE,
returns the statement or expression after the arrow.
Returns
| |
| getCaseKind | back to summary |
|---|---|
| public default CaseTree. Returns the kind of this case. | |
| getExpression | back to summary |
|---|---|
| public ExpressionTree getExpression()
Deprecated Please use Returns the expression for the case, or
| |
| getExpressions | back to summary |
|---|---|
| public List Returns the labels for this case. For default case, returns an empty list.
| |
| getGuard | back to summary |
|---|---|
| public ExpressionTree getGuard() The guard for the case.
| |
| getLabels | back to summary |
|---|---|
| public List Returns the labels for this case.
For
| |
| getStatements | back to summary |
|---|---|
| public List For case with kind CaseKind#STATEMENT,
returns the statements labeled by the case.
Returns
| |
case <expression>: <statements>case <expression> -> <expression>/<statement>| Modifier and Type | Field and Description |
|---|---|
| public static final CaseTree. | RULE
Case is in the form: |
| public static final CaseTree. | STATEMENT
Case is in the form: |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static CaseTree. | |
| public static CaseTree. |
| RULE | back to summary |
|---|---|
| public static final CaseTree. Case is in the form: | |
| STATEMENT | back to summary |
|---|---|
| public static final CaseTree. Case is in the form: | |
| CaseKind | back to summary |
|---|---|
| private CaseKind() | |
| valueOf | back to summary |
|---|---|
| public static CaseTree. | |
| values | back to summary |
|---|---|
| public static CaseTree. | |