22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 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 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'. | 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 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 * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool 43 * are deprecated with the intent to remove them in a future release. 44 * 45 * @since 9 46 */ 47 @Deprecated(since="11", forRemoval=true) 48 public interface TryTree extends StatementTree { 49 /** 50 * Returns the 'try' block of this 'try' statement. 51 * 52 * @return the 'try' block 53 */ 54 BlockTree getBlock(); 55 56 /** 57 * Returns the list of 'catch' statements associated with this 'try'. 58 * 59 * @return the list of 'catch' statements associated with this 'try'. 60 */ 61 List<? extends CatchTree> getCatches(); 62 63 /** 64 * Returns the 'finally' block associated with this 'try'. This is 65 * null if there is no 'finally' block associated with this 'try'. 66 * 67 * @return the 'finally' block associated with this 'try'. |