StatementTree
, Tree
public interface TryTree extends StatementTree
try
statement.
For example:
try block catches finally finallyBlock
Modifier and Type | Method | Description |
---|---|---|
BlockTree |
getBlock() |
Returns the block of the
try statement. |
List<? extends CatchTree> |
getCatches() |
Returns any catch blocks provided in the
try statement. |
BlockTree |
getFinallyBlock() |
Returns the finally block provided in the
try statement,
or null if there is none. |
List<? extends Tree> |
getResources() |
Returns any resource declarations provided in the
try statement. |
BlockTree getBlock()
try
statement.List<? extends CatchTree> getCatches()
try
statement.
The result will be an empty list if there are no
catch blocks.BlockTree getFinallyBlock()
try
statement,
or null
if there is none.
Copyright © 2005, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-Ubuntu+0-9b144-1ubuntu1