|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.ast.ASTNode org.codehaus.groovy.ast.stmt.Statement org.codehaus.groovy.ast.stmt.BlockStatement
public class BlockStatement extends Statement
A list of statements and a scope.
Constructor Summary | |
BlockStatement()
|
|
BlockStatement(java.util.List 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 Summary | |
---|---|
void
|
addStatement(Statement statement)
|
void
|
addStatements(java.util.List listOfStatements)
|
java.util.List
|
getStatements()
|
java.lang.String
|
getText()
|
VariableScope
|
getVariableScope()
|
boolean
|
isEmpty()
|
void
|
setVariableScope(VariableScope scope)
|
java.lang.String
|
toString()
|
void
|
visit(GroovyCodeVisitor visitor)
|
Methods inherited from class Statement | |
---|---|
getStatementLabel, isEmpty, setStatementLabel |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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() |
Constructor Detail |
---|
public BlockStatement()
public BlockStatement(java.util.List statements, VariableScope scope)
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
public BlockStatement(Statement[] statements, VariableScope scope)
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
Method Detail |
---|
public void addStatement(Statement statement)
public void addStatements(java.util.List listOfStatements)
public java.util.List getStatements()
public java.lang.String getText()
public VariableScope getVariableScope()
public boolean isEmpty()
public void setVariableScope(VariableScope scope)
public java.lang.String toString()
public void visit(GroovyCodeVisitor visitor)
Groovy Documentation