public class ClosureExpression extends Expression
{ statement }or { i
->
statement } or { i, x, String y ->
statement }EMPTY_ARRAY
DOC_COMMENT
Constructor and Description |
---|
ClosureExpression(Parameter[] parameters,
Statement code) |
Modifier and Type | Method and Description |
---|---|
Statement |
getCode()
This gets the code statement of the closure.
|
Parameter[] |
getParameters() |
String |
getText() |
VariableScope |
getVariableScope() |
boolean |
isParameterSpecified() |
void |
setCode(Statement code)
This sets the code statement of the closure.
|
void |
setVariableScope(VariableScope variableScope) |
String |
toString() |
Expression |
transformExpression(ExpressionTransformer transformer)
Return a copy of the expression calling the transformer on any nested expressions
|
void |
visit(GroovyCodeVisitor visitor) |
getType, setType, transformExpressions, transformExpressions
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, hashCode, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
copyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData
public void visit(GroovyCodeVisitor visitor)
public Expression transformExpression(ExpressionTransformer transformer)
Expression
transformExpression
in class Expression
public Statement getCode()
public void setCode(Statement code)
code
- the new Statementpublic Parameter[] getParameters()
public boolean isParameterSpecified()
true
if one or more explicit parameters are suppliedpublic VariableScope getVariableScope()
public void setVariableScope(VariableScope variableScope)