Class TreeUtilsAfterJava11.SwitchExpressionUtils

java.lang.Object
org.checkerframework.javacutil.TreeUtilsAfterJava11.SwitchExpressionUtils
Enclosing class:
TreeUtilsAfterJava11

public static class TreeUtilsAfterJava11.SwitchExpressionUtils extends Object
Utility methods for accessing SwitchExpressionTree methods.
  • Method Details

    • getCases

      public static List<? extends CaseTree> getCases(Tree switchExpressionTree)
      Returns the cases of switchExpressionTree. For example
         switch ( expression ) {
           cases
         }
       
      Parameters:
      switchExpressionTree - the switch expression whose cases are returned
      Returns:
      the cases of switchExpressionTree
    • getExpression

      public static ExpressionTree getExpression(Tree switchExpressionTree)
      Returns the selector expression of switchExpressionTree. For example
         switch ( expression ) { ... }
       
      Parameters:
      switchExpressionTree - the switch expression whose selector expression is returned
      Returns:
      the selector expression of switchExpressionTree