KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > support > reflect > code > CtIfImpl


1 package spoon.support.reflect.code;
2
3 import spoon.reflect.code.CtCodeElement;
4 import spoon.reflect.code.CtExpression;
5 import spoon.reflect.code.CtIf;
6 import spoon.reflect.code.CtStatement;
7 import spoon.reflect.declaration.CtSimpleType;
8 import spoon.reflect.visitor.CtVisitor;
9
10 public class CtIfImpl extends CtStatementImpl implements CtIf {
11     private static final long serialVersionUID = 1L;
12     CtExpression<Boolean JavaDoc> condition;
13     
14     CtStatement elseStatement;
15
16     CtStatement thenStatement;
17
18     public void accept(CtVisitor visitor) {
19         visitor.visitCtIf(this);
20     }
21
22     public CtExpression<Boolean JavaDoc> getCondition() {
23         return condition;
24     }
25
26     public CtStatement getElseStatement() {
27         return elseStatement;
28     }
29
30     public CtCodeElement getSubstitution(CtSimpleType targetType) {
31         return getFactory().Core().clone(this);
32     }
33     
34     public CtStatement getThenStatement() {
35         return thenStatement;
36     }
37
38     public Void JavaDoc S() {
39         return null;
40     }
41
42     public void setCondition(CtExpression<Boolean JavaDoc> condition) {
43         this.condition = condition;
44     }
45
46     public void setElseStatement(CtStatement elseStatement) {
47         this.elseStatement=elseStatement;
48     }
49     
50     public void setThenStatement(CtStatement thenStatement) {
51         this.thenStatement=thenStatement;
52     }
53
54 }
55
Popular Tags