软件包  jdk.nashorn.api.tree

Interface SwitchTree

  • All Superinterfaces:
    StatementTree

    @Deprecated(since="11",
                forRemoval=true)
    public interface SwitchTree
    extends StatementTree
    Deprecated, for removal: This API element is subject to removal in a future version.
    Nashorn JavaScript script engine and APIs, and the jjs tool are deprecated with the intent to remove them in a future release.
    “switch”语句的树节点。 例如:
      switch ( expression ) {
         cases
       } 
    从以下版本开始:
    9
    • 方法详细信息

      • getExpression

        ExpressionTree getExpression()
        Deprecated, for removal: This API element is subject to removal in a future version.
        返回此语句切换的表达式。
        结果
        切换表达式
      • getCases

        List<? extends CaseTree> getCases()
        Deprecated, for removal: This API element is subject to removal in a future version.
        返回'case'语句列表。
        结果
        '案例'陈述