Package org.checkerframework.javacutil
Class TreeUtilsAfterJava11.SwitchExpressionUtils
- java.lang.Object
-
- org.checkerframework.javacutil.TreeUtilsAfterJava11.SwitchExpressionUtils
-
- Enclosing class:
- TreeUtilsAfterJava11
public static class TreeUtilsAfterJava11.SwitchExpressionUtils extends java.lang.Object
Utility methods for accessingSwitchExpressionTree
methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<? extends com.sun.source.tree.CaseTree>
getCases(com.sun.source.tree.Tree switchExpressionTree)
Returns the cases ofswitchExpressionTree
.static com.sun.source.tree.ExpressionTree
getExpression(com.sun.source.tree.Tree switchExpressionTree)
Returns the selector expression ofswitchExpressionTree
.
-
-
-
Method Detail
-
getCases
public static java.util.List<? extends com.sun.source.tree.CaseTree> getCases(com.sun.source.tree.Tree switchExpressionTree)
Returns the cases ofswitchExpressionTree
. For exampleswitch ( expression ) { cases }
- Parameters:
switchExpressionTree
- the switch expression whose cases are returned- Returns:
- the cases of
switchExpressionTree
-
getExpression
public static com.sun.source.tree.ExpressionTree getExpression(com.sun.source.tree.Tree switchExpressionTree)
Returns the selector expression ofswitchExpressionTree
. For exampleswitch ( expression ) { ... }
- Parameters:
switchExpressionTree
- the switch expression whose selector expression is returned- Returns:
- the selector expression of
switchExpressionTree
-
-