-
- 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockTree
getBlock()
Returns the 'try' block of this 'try' statement.List<? extends CatchTree>
getCatches()
Returns the list of 'catch' statements associated with this 'try'.BlockTree
getFinallyBlock()
Returns the 'finally' block associated with this 'try'.-
Methods inherited from interface jdk.nashorn.api.tree.Tree
accept, getEndPosition, getKind, getStartPosition
-
-
-
-
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'.
-
-