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 @jdk.Exported
45 public interface IfTree extends StatementTree {
46 /**
47 * Returns the condition expression of this 'if' statement.
48 *
49 * @return the condition expression
50 */
51 ExpressionTree getCondition();
52
53 /**
54 * Returns the 'then' statement of this 'if' statement.
55 *
56 * @return the 'then' statement
57 */
58 StatementTree getThenStatement();
59
60 /**
61 * Returns the then statement of this 'if' statement.
62 * null if this if statement has no else branch.
|
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 @jdk.Exported
45 public interface IfTree extends StatementTree {
46 /**
47 * Returns the condition expression of this 'if' statement.
48 *
49 * @return the condition expression
50 */
51 ExpressionTree getCondition();
52
53 /**
54 * Returns the 'then' statement of this 'if' statement.
55 *
56 * @return the 'then' statement
57 */
58 StatementTree getThenStatement();
59
60 /**
61 * Returns the then statement of this 'if' statement.
62 * null if this if statement has no else branch.
|