KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ast > If


1 package polyglot.ast;
2
3 /**
4  * An immutable representation of a Java language <code>if</code> statement.
5  * Contains an expression whose value is tested, a "then" statement
6  * (consequent), and optionally an "else" statement (alternate).
7  */

8 public interface If extends CompoundStmt
9 {
10     /** Get the if's condition. */
11     Expr cond();
12     /** Set the if's condition. */
13     If cond(Expr cond);
14
15     /** Get the if's then clause. */
16     Stmt consequent();
17     /** Set the if's then clause. */
18     If consequent(Stmt consequent);
19
20     /** Get the if's else clause, or null. */
21     Stmt alternative();
22     /** Set the if's else clause. */
23     If alternative(Stmt alternative);
24 }
25
Popular Tags