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 /**
29 * A tree node for an 'if' statement.
30 *
31 * For example:
32 * <pre>
33 * if ( <em>condition</em> )
34 * <em>thenStatement</em>
35 *
36 * if ( <em>condition</em> )
37 * <em>thenStatement</em>
38 * else
39 * <em>elseStatement</em>
40 * </pre>
41 *
42 * @since 1.9
43 */
44 public interface IfTree extends StatementTree {
45 /**
46 * Returns the condition expression of this 'if' statement.
47 *
48 * @return the condition expression
49 */
50 ExpressionTree getCondition();
51
52 /**
53 * Returns the 'then' statement of this 'if' statement.
54 *
55 * @return the 'then' statement
56 */
57 StatementTree getThenStatement();
58
59 /**
60 * Returns the then statement of this 'if' statement.
61 * null if this if statement has no else branch.
62 *
|
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 /**
29 * A tree node for an 'if' statement.
30 *
31 * For example:
32 * <pre>
33 * if ( <em>condition</em> )
34 * <em>thenStatement</em>
35 *
36 * if ( <em>condition</em> )
37 * <em>thenStatement</em>
38 * else
39 * <em>elseStatement</em>
40 * </pre>
41 *
42 * @since 9
43 */
44 public interface IfTree extends StatementTree {
45 /**
46 * Returns the condition expression of this 'if' statement.
47 *
48 * @return the condition expression
49 */
50 ExpressionTree getCondition();
51
52 /**
53 * Returns the 'then' statement of this 'if' statement.
54 *
55 * @return the 'then' statement
56 */
57 StatementTree getThenStatement();
58
59 /**
60 * Returns the then statement of this 'if' statement.
61 * null if this if statement has no else branch.
62 *
|