Package org.sonar.plugins.java.api.tree
Interface CaseLabelTree
- All Superinterfaces:
Tree
- All Known Implementing Classes:
CaseLabelTreeImpl
'case' label in a 'switch' statement.
JLS 14.11
case: default :invalid @link
#expression()
- Since:
- Java 1.3
case
, Java 12 (SonarJava 5.12 - Support of Java 12)expressions()
: caseexpressions()
-> default ->
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
-
Method Details
-
caseOrDefaultKeyword
SyntaxToken caseOrDefaultKeyword() -
isFallThrough
boolean isFallThrough()- Returns:
- true for case with colon: "case 3:" or "default:" false for case with arrow: "case 3 ->" or "default ->"
- Since:
- SonarJava 5.12: Support of Java 12
-
expressions
List<ExpressionTree> expressions()- Since:
- SonarJava 5.12: Support of Java 12
-
colonOrArrowToken
SyntaxToken colonOrArrowToken()- Since:
- SonarJava 5.12: Support of Java 12
-