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
  • Nested Class Summary

    Nested classes/interfaces declared in interface jdk.nashorn.api.tree.Tree

    Tree.Kind
  • Method Summary

    Modifier and Type Method Description
    BlockTree getBlock()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the 'try' block of this 'try' statement.
    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'.
    BlockTree getFinallyBlock()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the 'finally' block associated with this 'try'.

    Methods declared in interface jdk.nashorn.api.tree.Tree

    accept, getEndPosition, getKind, getStartPosition
  • Method Details

    • 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'.