Interface TryTree

  • All Superinterfaces:
    StatementTree, Tree


    public interface TryTree
    extends StatementTree
    A tree node for a 'try' statement. For example:
       try
           block
       catches
       finally
           finallyBlock
     
    Since:
    9
    • Method Detail

      • getBlock

        BlockTree getBlock​()
        Returns the 'try' block of this 'try' statement.
        Returns:
        the 'try' block
      • getCatches

        List<? extends CatchTree> getCatches​()
        Returns the list of 'catch' statements associated with this 'try'.
        Returns:
        the list of 'catch' statements associated with this 'try'.
      • getFinallyBlock

        BlockTree getFinallyBlock​()
        Returns the 'finally' block associated with this 'try'. This is null if there is no 'finally' block associated with this 'try'.
        Returns:
        the 'finally' block associated with this 'try'.