public class MapEntryExpression
extends Expression
Represents an entry inside a map expression such as 1 : 2 or 'foo' : 'bar'.
| Fields inherited from class | Fields |
|---|---|
class Expression |
EMPTY_ARRAY |
| Constructor and description |
|---|
MapEntryExpression(Expression keyExpression, Expression valueExpression)Builds a map entry from the key and value expressions. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Expression |
getKeyExpression()Returns the key expression, the left side of the colon. |
|
public Expression |
getValueExpression()Returns the value expression, the right side of the colon. |
|
public void |
setKeyExpression(Expression keyExpression)Replaces the key expression. |
|
public void |
setValueExpression(Expression valueExpression)Replaces the value expression. |
|
public String |
toString() |
|
public Expression |
transformExpression(ExpressionTransformer transformer) |
|
public void |
visit(GroovyCodeVisitor visitor) |
| Methods inherited from class | Name |
|---|---|
class Expression |
getType, setType, transformExpression, transformExpressions, transformExpressions |
class AnnotatedNode |
addAnnotation, 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 |
Builds a map entry from the key and value expressions.
keyExpression - expression on the left of the colonvalueExpression - expression on the right of the colonReturns the key expression, the left side of the colon.
Returns the value expression, the right side of the colon.
Replaces the key expression.
keyExpression - the expression to store on the left of the colonReplaces the value expression.
valueExpression - the expression to store on the right of the colonCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.