polyglot.ast
Interface For

All Superinterfaces:
java.lang.Cloneable, CompoundStmt, Copy, JL, Loop, Node, NodeOps, Stmt, Term
All Known Implementing Classes:
For_c

public interface For
extends Loop

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
 For body(Stmt body)
          Set the loop body
 For cond(Expr cond)
          Set the loop condition
 java.util.List inits()
          List of initialization statements.
 For inits(java.util.List inits)
          Set the list of initialization statements.
 java.util.List iters()
          List of iterator expressions.
 For iters(java.util.List iters)
          Set the list of iterator expressions.
 
Methods inherited from interface polyglot.ast.Loop
body, cond, condIsConstant, condIsConstantTrue, continueTarget
 
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

inits

java.util.List inits()
List of initialization statements.

Returns:
A list of ForInit.

inits

For inits(java.util.List inits)
Set the list of initialization statements.

Parameters:
inits - A list of ForInit.

cond

For cond(Expr cond)
Set the loop condition


iters

java.util.List iters()
List of iterator expressions.

Returns:
A list of ForUpdate.

iters

For iters(java.util.List iters)
Set the list of iterator expressions.

Parameters:
iters - A list of ForUpdate.

body

For body(Stmt body)
Set the loop body