Package org.codehaus.groovy.ast.stmt
Class BlockStatement
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.stmt.Statement
org.codehaus.groovy.ast.stmt.BlockStatement
- All Implemented Interfaces:
- NodeMetaDataHandler
A list of statements and a scope.
- 
Constructor SummaryConstructorsConstructorDescriptionBlockStatement(List<Statement> statements, VariableScope scope) Creates a BlockStatement with a scope and children statements.BlockStatement(Statement[] statements, VariableScope scope) Creates a BlockStatement with a scope and children statements.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddStatement(Statement statement) voidaddStatements(List<Statement> listOfStatements) getText()booleanisEmpty()voidsetVariableScope(VariableScope scope) toString()voidvisit(GroovyCodeVisitor visitor) Methods inherited from class org.codehaus.groovy.ast.stmt.StatementaddStatementLabel, copyStatementLabels, getStatementLabel, getStatementLabels, setStatementLabelMethods inherited from class org.codehaus.groovy.ast.ASTNodecopyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePositionMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandlercopyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, newMetaDataMap, putNodeMetaData, removeNodeMetaData, setNodeMetaData
- 
Constructor Details- 
BlockStatementpublic BlockStatement()
- 
BlockStatementCreates a BlockStatement with a scope and children statements.- Parameters:
- statements- the statements, which cannot be null or an exception occurs. No reference to the array is held, so modifying the array later has no effect on this class.
- scope- the scope
 
- 
BlockStatementCreates a BlockStatement with a scope and children statements.- Parameters:
- statements- the statements. Do not pass null. If you do, no exception will occur, but a NullPointerException will eventually occur later. Also, a reference to the list is kept, so modifying the List later does effect this class.
- scope- the scope
 
 
- 
- 
Method Details