< prev index next >

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

Print this page

      20  *
      21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      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 'switch' statement.
      32  *
      33  * For example:
      34  * <pre>
      35  *   switch ( <em>expression</em> ) {
      36  *     <em>cases</em>
      37  *   }
      38  * </pre>
      39  *

      40  * @since 9
      41  */

      42 public interface SwitchTree extends StatementTree {
      43     /**
      44      * Returns the expression on which this statement switches.
      45      *
      46      * @return the switch expression
      47      */
      48     ExpressionTree getExpression();
      49
      50
      51     /**
      52      * Returns the list of 'case' statements.
      53      *
      54      * @return the 'case' statements
      55      */
      56     List<? extends CaseTree> getCases();
      57 }
      20  *
      21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      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 'switch' statement.
      32  *
      33  * For example:
      34  * <pre>
      35  *   switch ( <em>expression</em> ) {
      36  *     <em>cases</em>
      37  *   }
      38  * </pre>
      39  *
      40  * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
      41  * are deprecated with the intent to remove them in a future release.
      42  *
      43  * @since 9
      44  */
      45 @Deprecated(since="11", forRemoval=true)
      46 public interface SwitchTree extends StatementTree {
      47     /**
      48      * Returns the expression on which this statement switches.
      49      *
      50      * @return the switch expression
      51      */
      52     ExpressionTree getExpression();
      53
      54
      55     /**
      56      * Returns the list of 'case' statements.
      57      *
      58      * @return the 'case' statements
      59      */
      60     List<? extends CaseTree> getCases();
      61 }

< prev index next >