public class BlockStatement
extends Statement
A list of statements and a scope.
| Constructor and description |
|---|
BlockStatement() |
BlockStatement(Statement[] statements, VariableScope scope)Creates a BlockStatement with a scope and children statements. |
BlockStatement(List<Statement> statements, VariableScope scope)Creates a BlockStatement with a scope and children statements. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
addStatement(Statement statement) |
|
public void |
addStatements(List<Statement> listOfStatements) |
|
public List<Statement> |
getStatements() |
|
public String |
getText() |
|
public VariableScope |
getVariableScope() |
|
public boolean |
isEmpty() |
|
public void |
setVariableScope(VariableScope scope) |
|
public String |
toString() |
|
public void |
visit(GroovyCodeVisitor visitor) |
| Methods inherited from class | Name |
|---|---|
class Statement |
addStatementAnnotation, addStatementLabel, copyStatementLabels, getStatementAnnotations, getStatementLabel, getStatementLabels, isEmpty, setStatementLabel |
class ASTNode |
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit |
Creates a BlockStatement with a scope and children statements.
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 scopeCreates a BlockStatement with a scope and children statements.
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 scopeCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.