polyglot.ast
Interface Loop

All Superinterfaces:
java.lang.Cloneable, CompoundStmt, Copy, JL, Node, NodeOps, Stmt, Term
All Known Subinterfaces:
Do, For, While
All Known Implementing Classes:
Do_c, For_c, Loop_c, While_c

public interface Loop
extends CompoundStmt

An immutable representation of a Java language for statement. Contains a statement to be executed and an expression to be tested indicating whether to reexecute the statement.


Method Summary
 Stmt body()
          Loop body.
 Expr cond()
          Loop condition
 boolean condIsConstant()
          Returns true of cond() evaluates to a constant.
 boolean condIsConstantTrue()
          Returns true if cond() is a constant that evaluates to true.
 Term continueTarget()
          Target of a continue statement in the loop body.
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, entry, exceptions, exceptions, reachable, reachable
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

cond

Expr cond()
Loop condition


condIsConstant

boolean condIsConstant()
Returns true of cond() evaluates to a constant.


condIsConstantTrue

boolean condIsConstantTrue()
Returns true if cond() is a constant that evaluates to true.


body

Stmt body()
Loop body.


continueTarget

Term continueTarget()
Target of a continue statement in the loop body.