Top Description Fields Constructors Methods
org.codehaus.groovy.ast.stmt

public Class ForStatement

extends Statement
implements LoopingStatement
Class Inheritance
All Implemented Interfaces
org.codehaus.groovy.ast.stmt.LoopingStatement
Imports
org.codehaus.groovy.ast.ClassHelper, .ClassNode, .GroovyCodeVisitor, .Parameter, .VariableScope, org.codehaus.groovy.ast.expr.Expression

Represents a standard for loop in Groovy

Field Summary

Modifier and TypeField and Description
private Expression
public static final Parameter
private Statement
private VariableScope
private Parameter

Constructor Summary

AccessConstructor and Description
public
ForStatement(Parameter variable, Expression collectionExpression, Statement loopBlock)

Method Summary

Modifier and TypeMethod and Description
public Expression
public Statement
public Parameter
public VariableScope
public ClassNode
public void
setCollectionExpression(Expression collectionExpression)

public void
public void
public void
Inherited from org.codehaus.groovy.ast.stmt.Statement:
addStatementLabelcopyStatementLabelsgetStatementLabelgetStatementLabelsisEmptysetStatementLabel

Field Detail

collectionExpressionback to summary
private Expression collectionExpression
FOR_LOOP_DUMMYback to summary
public static final Parameter FOR_LOOP_DUMMY
loopBlockback to summary
private Statement loopBlock
scopeback to summary
private VariableScope scope
variableback to summary
private Parameter variable

Constructor Detail

ForStatementback to summary
public ForStatement(Parameter variable, Expression collectionExpression, Statement loopBlock)

Method Detail

getCollectionExpressionback to summary
public Expression getCollectionExpression()
getLoopBlockback to summary
public Statement getLoopBlock()

Implements org.codehaus.groovy.ast.stmt.LoopingStatement.getLoopBlock.

Doc from org.codehaus.groovy.ast.stmt.LoopingStatement.getLoopBlock.

Gets the loop block.

getVariableback to summary
public Parameter getVariable()
getVariableScopeback to summary
public VariableScope getVariableScope()
getVariableTypeback to summary
public ClassNode getVariableType()
setCollectionExpressionback to summary
public void setCollectionExpression(Expression collectionExpression)
setLoopBlockback to summary
public void setLoopBlock(Statement loopBlock)

Implements org.codehaus.groovy.ast.stmt.LoopingStatement.setLoopBlock.

Doc from org.codehaus.groovy.ast.stmt.LoopingStatement.setLoopBlock.

Sets the loop block.

setVariableScopeback to summary
public void setVariableScope(VariableScope variableScope)
visitback to summary
public void visit(GroovyCodeVisitor visitor)

Overrides org.codehaus.groovy.ast.ASTNode.visit.