Package org.codehaus.groovy.ast.expr
Class Expression
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
org.codehaus.groovy.ast.expr.Expression
- All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>
,NodeMetaDataHandler
- Direct Known Subclasses:
AbstractGinqExpression
,ArrayExpression
,BinaryExpression
,BitwiseNegationExpression
,BooleanExpression
,BytecodeExpression
,CastExpression
,ClassExpression
,ClosureExpression
,ConstantExpression
,ConstructorCallExpression
,EmptyExpression
,FieldExpression
,GStringExpression
,ListExpression
,ListOfExpressionsExpression
,MapEntryExpression
,MapExpression
,MethodCallExpression
,MethodPointerExpression
,PostfixExpression
,PrefixExpression
,PropertyExpression
,RangeExpression
,SpreadExpression
,SpreadMapExpression
,StaticMethodCallExpression
,TemporaryVariableExpression
,TernaryExpression
,TupleExpression
,UnaryMinusExpression
,UnaryPlusExpression
,VariableExpression
Base class for any expression.
-
Field Summary
Fields inherited from interface groovy.lang.groovydoc.GroovydocHolder
DOC_COMMENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetType()
void
abstract Expression
transformExpression
(ExpressionTransformer transformer) Transforms this expression and any nested expressions.protected List<Expression>
transformExpressions
(List<? extends Expression> expressions, ExpressionTransformer transformer) Transforms list of expressions.protected <T extends Expression>
List<T>transformExpressions
(List<? extends Expression> expressions, ExpressionTransformer transformer, Class<T> targetType) Transforms list of expressions and checks that all transformed expressions have the given type.Methods inherited from class org.codehaus.groovy.ast.AnnotatedNode
addAnnotation, addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
Methods inherited from class org.codehaus.groovy.ast.ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler
copyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, newMetaDataMap, putNodeMetaData, removeNodeMetaData, setNodeMetaData
-
Field Details
-
EMPTY_ARRAY
-
-
Constructor Details
-
Expression
public Expression()
-
-
Method Details
-
getType
-
setType
-
transformExpression
Transforms this expression and any nested expressions. -
transformExpressions
protected List<Expression> transformExpressions(List<? extends Expression> expressions, ExpressionTransformer transformer) Transforms list of expressions.- Returns:
- a new list of transformed expressions
-
transformExpressions
protected <T extends Expression> List<T> transformExpressions(List<? extends Expression> expressions, ExpressionTransformer transformer, Class<T> targetType) Transforms list of expressions and checks that all transformed expressions have the given type.- Returns:
- a new type-safe list of transformed expressions
-