< prev index next >

## src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CaseTree.java

Print this page

      22  * or visit www.oracle.com if you need additional information or have any
      23  * questions.
      24  */
      25
      26 package jdk.nashorn.api.tree;
      27
      28 import java.util.List;
      29
      30 /**
      31  * A tree node for a 'case' in a 'switch' statement.
      32  *
      33  * For example:
      34  * <pre>
      35  *   case <em>expression</em> :
      36  *       <em>statements</em>
      37  *
      38  *   default :
      39  *       <em>statements</em>
      40  * </pre>
      41  *

      42  * @since 9
      43  */

      44 public interface CaseTree extends Tree {
      45     /**
      46      * Case expression of this 'case' statement.
      47      *
      48      * @return null if and only if this Case is {@code default:}
      49      */
      50     ExpressionTree getExpression();
      51
      52     /**
      53      * Return the list of statements for this 'case'.
      54      *
      55      * @return list of statements for this 'case'
      56      */
      57     List<? extends StatementTree> getStatements();
      58 }
      22  * or visit www.oracle.com if you need additional information or have any
      23  * questions.
      24  */
      25
      26 package jdk.nashorn.api.tree;
      27
      28 import java.util.List;
      29
      30 /**
      31  * A tree node for a 'case' in a 'switch' statement.
      32  *
      33  * For example:
      34  * <pre>
      35  *   case <em>expression</em> :
      36  *       <em>statements</em>
      37  *
      38  *   default :
      39  *       <em>statements</em>
      40  * </pre>
      41  *
      42  * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
      43  * are deprecated with the intent to remove them in a future release.
      44  *
      45  * @since 9
      46  */
      47 @Deprecated(since="11", forRemoval=true)
      48 public interface CaseTree extends Tree {
      49     /**
      50      * Case expression of this 'case' statement.
      51      *
      52      * @return null if and only if this Case is {@code default:}
      53      */
      54     ExpressionTree getExpression();
      55
      56     /**
      57      * Return the list of statements for this 'case'.
      58      *
      59      * @return list of statements for this 'case'
      60      */
      61     List<? extends StatementTree> getStatements();
      62 }

< prev index next >