软件包  jdk.nashorn.api.tree

Interface IfTree

  • All Superinterfaces:
    StatementTree

    @Deprecated(since="11",            forRemoval=true)public interface IfTreeextends 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.
    'if'语句的树节点。 例如:
      if ( condition )      thenStatement   if ( condition )       thenStatement   else       elseStatement 
    从以下版本开始:
    9
    • 方法详细信息

      • getCondition

        ExpressionTree getCondition()
        Deprecated, for removal: This API element is subject to removal in a future version.
        返回此“if”语句的条件表达式。
        结果
        条件表达式
      • getThenStatement

        StatementTree getThenStatement()
        Deprecated, for removal: This API element is subject to removal in a future version.
        返回此'if'语句的'then'语句。
        结果
        'then'声明
      • getElseStatement

        StatementTree getElseStatement()
        Deprecated, for removal: This API element is subject to removal in a future version.
        返回此“if”语句的then语句。 如果此if语句没有else分支,则返回null。
        结果
        'else'声明