模块 jdk.compiler

接口 TryTree

所有父级接口:
StatementTree , Tree

public interface TryTree extends StatementTree
try 语句的树节点。例如:
  try
    block 
  catches 
  finally
    finallyBlock 
 
Java 语言规范:
14.20 try语句
自从:
1.6
  • 方法详情

    • getBlock

      BlockTree  getBlock()
      返回 try 语句的块。
      返回:
      街区
    • getCatches

      List <? extends CatchTree > getCatches()
      返回 try 语句中提供的任何 catch 块。如果没有 catch 块,结果将是一个空列表。
      返回:
      捕获块
    • getFinallyBlock

      BlockTree  getFinallyBlock()
      返回 try 语句中提供的 finally 块,如果没有则返回 null
      返回:
      最后块
    • getResources

      List <? extends Tree > getResources()
      返回 try 语句中提供的任何资源声明。如果没有资源声明,结果将是一个空列表。
      返回:
      资源声明