Groovy Documentation

## org.codehaus.groovy.ast.stmt
[Java] Class ForStatement

    java.lang.Object
      org.codehaus.groovy.ast.ASTNode
          org.codehaus.groovy.ast.stmt.Statement
              org.codehaus.groovy.ast.stmt.ForStatement

All Implemented Interfaces:
  LoopingStatement

    public class ForStatement
    extends Statement

Represents a standard for loop in Groovy

Authors:
  James Strachan

Version:
  \$Revision\$

Field Summary
`static Parameter` | `FOR_LOOP_DUMMY`

Constructor Summary
`ForStatement(Parameter variable, Expression collectionExpression, Statement loopBlock)`

Method Summary
`Expression` | `getCollectionExpression()`
`Statement` | `getLoopBlock()`
`Parameter` | `getVariable()`
`VariableScope` | `getVariableScope()`
`ClassNode` | `getVariableType()`
`void` | `setCollectionExpression(Expression collectionExpression)`
`void` | `setLoopBlock(Statement loopBlock)`
`void` | `setVariableScope(VariableScope variableScope)`
`void` | `visit(GroovyCodeVisitor visitor)`

Methods inherited from class Statement
getStatementLabel, isEmpty, setStatementLabel

Methods inherited from class ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getText, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### FOR_LOOP_DUMMY

    public static final Parameter FOR_LOOP_DUMMY

Constructor Detail

### ForStatement

    public ForStatement(Parameter variable, Expression collectionExpression, Statement loopBlock)

Method Detail

### getCollectionExpression

    public Expression getCollectionExpression()

### getLoopBlock

    public Statement getLoopBlock()

### getVariable

    public Parameter getVariable()

### getVariableScope

    public VariableScope getVariableScope()

### getVariableType

    public ClassNode getVariableType()

### setCollectionExpression

    public void setCollectionExpression(Expression collectionExpression)

### setLoopBlock

    public void setLoopBlock(Statement loopBlock)

### setVariableScope

    public void setVariableScope(VariableScope variableScope)

### visit

    public void visit(GroovyCodeVisitor visitor)

Groovy Documentation