- All Superinterfaces:
Tree
A tree node for a 'catch' block in a 'try' statement.
For example:
catch ( parameter ) block
- Since:
- 9
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBlock()
Returns the code block of this catch block.Returns the optional catch condition expression.Returns the catch parameter identifier or parameter binding pattern of the exception caught.Methods inherited from interface org.openjdk.nashorn.api.tree.Tree
accept, getEndPosition, getKind, getStartPosition
-
Method Details
-
getParameter
ExpressionTree getParameter()Returns the catch parameter identifier or parameter binding pattern of the exception caught.- Returns:
- the catch parameter identifier or parameter binding pattern
-
getBlock
BlockTree getBlock()Returns the code block of this catch block.- Returns:
- the code block
-
getCondition
ExpressionTree getCondition()Returns the optional catch condition expression. This is null if this is an unconditional catch statement.- Returns:
- the optional catch condition expression.
-