1 package polyglot.ast; 2 3 import java.util.*; 4 5 /** 6 * An immutable representation of a Java language <code>for</code> 7 * statement. Contains a statement to be executed and an expression 8 * to be tested indicating whether to reexecute the statement. 9 */ 10 public interface Loop extends CompoundStmt 11 { 12 /** Loop condition */ 13 Expr cond(); 14 15 /** Returns true of cond() evaluates to a constant. */ 16 boolean condIsConstant(); 17 18 /** Returns true if cond() is a constant that evaluates to true. */ 19 boolean condIsConstantTrue(); 20 21 /** Loop body. */ 22 Stmt body(); 23 24 /** Target of a continue statement in the loop body. */ 25 Term continueTarget(); 26 } 27