public class For extends LoopStatement implements VariableScope
| Modifier and Type | Field and Description | 
|---|---|
private static ImmutableArray<VariableSpecification> | 
EMPTY_VARSPECS  | 
body, guard, inits, updates| Constructor and Description | 
|---|
For()
For. 
 | 
For(ExtList children)  | 
For(ILoopInit inits,
   IGuard guard,
   IForUpdates updates,
   Statement body)  | 
For(ILoopInit inits,
   IGuard guard,
   IForUpdates updates,
   Statement body,
   ExtList comments)  | 
For(ILoopInit inits,
   IGuard guard,
   IForUpdates updates,
   Statement body,
   ExtList comments,
   PositionInfo pos)  | 
For(LoopInitializer[] inits,
   Expression guard,
   Expression[] updates,
   Statement body)
For. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
SourceElement | 
getLastElement()
Finds the source element that occurs last in the source. 
 | 
VariableSpecification | 
getVariableInScope(java.lang.String name)  | 
ImmutableArray<VariableSpecification> | 
getVariablesInScope()  | 
boolean | 
isCheckedBeforeIteration()
Is checked before iteration. 
 | 
boolean | 
isDefinedScope()  | 
void | 
prettyPrint(PrettyPrinter p)
Pretty printing the source element. 
 | 
void | 
visit(Visitor v)
calls the corresponding method of a visitor in order to
 perform some action/transformation on this element 
 | 
equals, getBody, getChildAt, getChildCount, getExpressionAt, getExpressionCount, getGuard, getGuardExpression, getIForUpdates, getILoopInit, getInitializers, getStatementAt, getStatementCount, getUpdatescompatibleBlockSize, computeHashCode, equalsModRenaming, getArrayPos, match, matchChildrengetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getFirstElement, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetChildAt, getChildCountgetComments, matchequalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPositionprivate static final ImmutableArray<VariableSpecification> EMPTY_VARSPECS
public For()
public For(LoopInitializer[] inits, Expression guard, Expression[] updates, Statement body)
inits - a loop initializer mutable list.guard - an expression.updates - an expression mutable list.body - a statement.public For(ILoopInit inits, IGuard guard, IForUpdates updates, Statement body, ExtList comments)
public For(ILoopInit inits, IGuard guard, IForUpdates updates, Statement body, ExtList comments, PositionInfo pos)
public For(ILoopInit inits, IGuard guard, IForUpdates updates, Statement body)
public For(ExtList children)
public SourceElement getLastElement()
JavaSourceElementgetLastElement in interface SourceElementgetLastElement in class JavaSourceElementJavaSourceElement.toSource(), 
JavaSourceElement.getEndPosition()public boolean isCheckedBeforeIteration()
isCheckedBeforeIteration in class LoopStatementpublic boolean isDefinedScope()
public ImmutableArray<VariableSpecification> getVariablesInScope()
public VariableSpecification getVariableInScope(java.lang.String name)
public void visit(Visitor v)
visit in interface SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElementprettyPrint in interface SourceElementprettyPrint in class JavaProgramElementp - a pretty printer.java.io.IOException - occasionally thrown.