Class TreeUtilsAfterJava11.ConstantCaseLabelUtils

  • Enclosing class:
    TreeUtilsAfterJava11

    public static class TreeUtilsAfterJava11.ConstantCaseLabelUtils
    extends java.lang.Object
    Utility methods for accessing ConstantCaseLabelTree methods.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.sun.source.tree.ExpressionTree getConstantExpression​(com.sun.source.tree.Tree constantCaseLabelTree)
      Wrapper around ConstantCaseLabelTree#getConstantExpression.
      static boolean isConstantCaseLabelTree​(com.sun.source.tree.Tree tree)
      Returns true if tree is a ConstantCaseLabelTree.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isConstantCaseLabelTree

        public static boolean isConstantCaseLabelTree​(com.sun.source.tree.Tree tree)
        Returns true if tree is a ConstantCaseLabelTree.
        Parameters:
        tree - a tree to check
        Returns:
        true if tree is a ConstantCaseLabelTree
      • getConstantExpression

        public static com.sun.source.tree.ExpressionTree getConstantExpression​(com.sun.source.tree.Tree constantCaseLabelTree)
        Wrapper around ConstantCaseLabelTree#getConstantExpression.
        Parameters:
        constantCaseLabelTree - a ConstantCaseLabelTree tree
        Returns:
        the expression in the constantCaseLabelTree