[Java] Class Expression
- org.codehaus.groovy.ast.expr.Expression
Represents a base class for expressions which evaluate as an object
Properties Summary
Type | Name and description |
---|---|
ClassNode |
type |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
ClassNode |
getType() | |
void |
setType(ClassNode t) | |
Expression |
transformExpression(ExpressionTransformer transformer) Return a copy of the expression calling the transformer on any nested expressions | |
protected List<Expression> |
transformExpressions(List<? extends Expression> expressions, ExpressionTransformer transformer) Transforms the list of expressions | |
<T extends Expression> | protected List<T> |
transformExpressions(List<? extends Expression> expressions, ExpressionTransformer transformer, Class<T> transformedType) Transforms the list of expressions, and checks that all transformed expressions have the given type. |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class AnnotatedNode | addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic |
class ASTNode | copyNodeMetaData, equals, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getNodeMetaData, getNodeMetaData, getText, hashCode, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit |
Property Detail
ClassNode type
Method Detail
public ClassNode getType()
public void setType(ClassNode t)
public Expression transformExpression(ExpressionTransformer transformer)
Return a copy of the expression calling the transformer on any nested expressions
- Parameters:
- transformer
protected List<Expression> transformExpressions(List<? extends Expression> expressions, ExpressionTransformer transformer)
Transforms the list of expressions
- Returns:
- a new list of transformed expressions
<T extends Expression> protected List<T> transformExpressions(List<? extends Expression> expressions, ExpressionTransformer transformer, Class<T> transformedType)
Transforms the list of expressions, and checks that all transformed expressions have the given type.
- Returns:
- a new list of transformed expressions
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.5.14/html/gapi/org/codehaus/groovy/ast/expr/Expression.html