public class EnhancedFor extends LoopStatement implements VariableScope
body, guard, inits, updates| Constructor and Description | 
|---|
EnhancedFor()
create empty for loop. 
 | 
EnhancedFor(ExtList children)
Used by the  
CreatingASTVisitor. | 
EnhancedFor(LoopInit init,
           Guard guard,
           Statement statement,
           ExtList comments,
           PositionInfo info)
Used for the Recoder2KeY transformation. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
SourceElement | 
getLastElement()
Finds the source element that occurs last in the source. 
 | 
LocalVariableDeclaration | 
getVariableDeclaration()
get the local variable declaration of the enhanced for-loop
  
for(type var : exp) gives type var. | 
boolean | 
isCheckedBeforeIteration()
Is checked before iteration. 
 | 
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, getStartPositionpublic EnhancedFor()
public EnhancedFor(LoopInit init, Guard guard, Statement statement, ExtList comments, PositionInfo info)
init - the initializers - here a single VariableDeclaration. may not be null.guard - a guard - here an expression of type Iterable. may not be null.statement - the statement of the loopcomments - collected commentsinfo - positionpublic EnhancedFor(ExtList children)
CreatingASTVisitor.children - a list of parameterspublic SourceElement getLastElement()
JavaSourceElementgetLastElement in interface SourceElementgetLastElement in class JavaSourceElementFor.getLastElement(), 
JavaSourceElement.getLastElement()public boolean isCheckedBeforeIteration()
LoopStatementisCheckedBeforeIteration in class LoopStatementFor.isCheckedBeforeIteration(), 
LoopStatement.isCheckedBeforeIteration()public void visit(Visitor v)
SourceElementvisit 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.public LocalVariableDeclaration getVariableDeclaration()
for(type var : exp) gives type var.