[Java] Class LambdaExpression
- org.codehaus.groovy.ast.expr.LambdaExpression
public class LambdaExpression extends ClosureExpression
Represents a lambda expression such as one of these:
e -> e * 2
(x, y) -> x + y
(x, y) -> { x + y
(int x, int y) -> { x + y }
}
Fields inherited from class | Fields |
---|---|
class Expression | EMPTY_ARRAY |
Constructor Summary
Constructor and description |
---|
LambdaExpression
(Parameter[] parameters, Statement code) |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public String |
getText() | |
public boolean |
isSerializable() | |
public void |
setSerializable(boolean serializable) | |
public void |
visit(GroovyCodeVisitor visitor) |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class ClosureExpression | getCode, getParameters, getText, getVariableScope, isParameterSpecified, setCode, setVariableScope, toString, transformExpression, visit |
class Expression | getType, setType, transformExpression, transformExpressions, transformExpressions |
class AnnotatedNode | addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic |
class ASTNode | copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit |
Constructor Detail
public LambdaExpression(Parameter[] parameters, Statement code)
Method Detail
@Override public String getText()
public boolean isSerializable()
public void setSerializable(boolean serializable)
public void visit(GroovyCodeVisitor visitor)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/codehaus/groovy/ast/expr/LambdaExpression.html