Interface TryTree
- All Superinterfaces:
-
StatementTree
,Tree
@Deprecated(since="11", forRemoval=true) public interface TryTree extends StatementTree
A tree node for a 'try' statement. For example:
try block catches finally finallyBlock
- Since:
- 9
Nested Classes
Nested classes/interfaces declared in interface jdk.nashorn.api.tree.Tree
Tree.Kind
Methods
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
Methods
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'.
© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/jdk.scripting.nashorn/jdk/nashorn/api/tree/TryTree.html