Interface TryTree

  • All Superinterfaces:
    StatementTree, Tree

    @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.
    A tree node for a 'try' statement. For example:
       try
           block
       catches
       finally
           finallyBlock
     
    Since:
    9
    • Method Detail

      • getBlock

        BlockTree getBlock()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns the 'try' block of this 'try' statement.
        Returns:
        the 'try' block
      • getCatches

        List<? extends CatchTree> getCatches()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns the list of 'catch' statements associated with this 'try'.
        Returns:
        the list of 'catch' statements associated with this 'try'.
      • getFinallyBlock

        BlockTree getFinallyBlock()
        Deprecated, for removal: This API element is subject to removal in a future version.
        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'.