KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > reflect > code > CtIf


1 package spoon.reflect.code;
2
3 import spoon.template.TemplateParameter;
4
5 /**
6  * This code element represents an <code>if</code> statement.
7  */

8 public interface CtIf extends CtStatement, TemplateParameter<Void JavaDoc> {
9
10     /**
11      * Gets the boolean expression that represents the <code>if</code>'s
12      * condition.
13      */

14     CtExpression<Boolean JavaDoc> getCondition();
15
16     /**
17      * Gets the statement executed when the condition is false.
18      */

19     CtStatement getElseStatement();
20
21     /**
22      * Gets the statement executed when the condition is true.
23      */

24     CtStatement getThenStatement();
25
26     /**
27      * Sets the boolean expression that represents the <code>if</code>'s
28      * condition.
29      */

30     void setCondition(CtExpression<Boolean JavaDoc> expression);
31
32     /**
33      * Sets the statement executed when the condition is false.
34      */

35     void setElseStatement(CtStatement elseStatement);
36
37     /**
38      * Sets the statement executed when the condition is true.
39      */

40     void setThenStatement(CtStatement thenStatement);
41
42 }
43
Popular Tags