Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Constructor and description |
---|
BlockStatement
() |
BlockStatement
(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. |
Type | Name and description |
---|---|
void |
addStatement(Statement statement) |
void |
addStatements(List<Statement> listOfStatements) |
List<Statement> |
getStatements() |
String |
getText() |
VariableScope |
getVariableScope() |
boolean |
isEmpty() |
void |
setVariableScope(VariableScope scope) |
String |
toString() |
void |
visit(GroovyCodeVisitor visitor) |
Methods inherited from class | Name |
---|---|
class Statement |
addStatementLabel, getStatementLabel, getStatementLabels, isEmpty, setStatementLabel |
class ASTNode |
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getNodeMetaData, getText, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit |
class Object |
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Creates 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 scopeCreates 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 scopeCopyright © 2003-2015 The Apache Software Foundation. All rights reserved.