软件包  jdk.nashorn.api.tree

Interface TryTree

  • All Superinterfaces:
    StatementTree

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

      • getBlock

        BlockTree getBlock()
        Deprecated, for removal: This API element is subject to removal in a future version.
        返回此'try'语句的'try'块。
        结果
        '尝试'块
      • getCatches

        List<? extends CatchTree> getCatches()
        Deprecated, for removal: This API element is subject to removal in a future version.
        返回与此'try'关联的'catch'语句列表。
        结果
        与'try'相关的'catch'语句列表。
      • getFinallyBlock

        BlockTree getFinallyBlock()
        Deprecated, for removal: This API element is subject to removal in a future version.
        返回与此'try'关联的'finally'块。 如果没有与此'try'关联的'finally'块,则该值为null。
        结果
        与此'尝试'相关联的'finally'块。