- All Superinterfaces:
StatementTree
,Tree
A tree node for a 'try' statement.
For example:
try block catches finally finallyBlock
- Since:
- 9
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBlock()
Returns the 'try' block of this 'try' statement.Returns the list of 'catch' statements associated with this 'try'.Returns the 'finally' block associated with this 'try'.Methods inherited from interface org.openjdk.nashorn.api.tree.Tree
accept, getEndPosition, getKind, getStartPosition
-
Method Details
-
getBlock
BlockTree getBlock()Returns the 'try' block of this 'try' statement.- Returns:
- the 'try' block
-
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'.
-