public class ArrayExpression extends Expression
Represents an array object construction. One of:
new String[3]
or new Integer[2][3])
new String[]{ "foo", "bar" }
)Fields inherited from class | Fields |
---|---|
class Expression |
EMPTY_ARRAY |
Constructor and description |
---|
ArrayExpression(ClassNode elementType, List<Expression> initExpressions, List<Expression> sizeExpressions) |
ArrayExpression(ClassNode elementType, List<Expression> initExpressions) Creates an array using an initializer (list of expressions corresponding to array elements) |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
addExpression(Expression initExpression) Add another element to the initializer expressions |
|
public ClassNode |
getElementType() |
|
public Expression |
getExpression(int i) Get a particular initializer expression |
|
public List<Expression> |
getExpressions() Get the initializer expressions |
|
public List<Expression> |
getSizeExpression()
|
|
public String |
getText() |
|
public boolean |
hasInitializer()
|
|
public boolean |
isDynamic() |
|
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, 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 |
Creates an array using an initializer (list of expressions corresponding to array elements)
Add another element to the initializer expressions
Get a particular initializer expression
Get the initializer expressions
Copyright © 2003-2022 The Apache Software Foundation. All rights reserved.