KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ext > jl > ast > Loop_c


1 package polyglot.ext.jl.ast;
2
3 import polyglot.ast.*;
4 import polyglot.types.*;
5 import polyglot.visit.*;
6 import polyglot.util.*;
7 import java.util.*;
8
9 /**
10  * An immutable representation of a Java language <code>while</code>
11  * statement. It contains a statement to be executed and an expression
12  * to be tested indicating whether to reexecute the statement.
13  */

14 public abstract class Loop_c extends Stmt_c implements Loop
15 {
16     public Loop_c(Position pos) {
17     super(pos);
18     }
19
20     public boolean condIsConstant() {
21         return cond().isConstant();
22     }
23
24     public boolean condIsConstantTrue() {
25         return Boolean.TRUE.equals(cond().constantValue());
26     }
27 }
28
Popular Tags