24 */
25
26 package jdk.nashorn.api.tree;
27
28 import java.util.List;
29
30 /**
31 * A tree node for a 'try' statement.
32 *
33 * For example:
34 * <pre>
35 * try
36 * <em>block</em>
37 * <em>catches</em>
38 * finally
39 * <em>finallyBlock</em>
40 * </pre>
41 *
42 * @since 1.9
43 */
44 @jdk.Exported
45 public interface TryTree extends StatementTree {
46 /**
47 * Returns the 'try' block of this 'try' statement.
48 *
49 * @return the 'try' block
50 */
51 BlockTree getBlock();
52
53 /**
54 * Returns the list of 'catch' statements associated with this 'try'.
55 *
56 * @return the list of 'catch' statements associated with this 'try'.
57 */
58 List<? extends CatchTree> getCatches();
59
60 /**
61 * Returns the 'finally' block associated with this 'try'. This is
62 * null if there is no 'finally' block associated with this 'try'.
63 *
64 * @return the 'finally' block associated with this 'try'.
|
24 */
25
26 package jdk.nashorn.api.tree;
27
28 import java.util.List;
29
30 /**
31 * A tree node for a 'try' statement.
32 *
33 * For example:
34 * <pre>
35 * try
36 * <em>block</em>
37 * <em>catches</em>
38 * finally
39 * <em>finallyBlock</em>
40 * </pre>
41 *
42 * @since 1.9
43 */
44 public interface TryTree extends StatementTree {
45 /**
46 * Returns the 'try' block of this 'try' statement.
47 *
48 * @return the 'try' block
49 */
50 BlockTree getBlock();
51
52 /**
53 * Returns the list of 'catch' statements associated with this 'try'.
54 *
55 * @return the list of 'catch' statements associated with this 'try'.
56 */
57 List<? extends CatchTree> getCatches();
58
59 /**
60 * Returns the 'finally' block associated with this 'try'. This is
61 * null if there is no 'finally' block associated with this 'try'.
62 *
63 * @return the 'finally' block associated with this 'try'.
|