Groovy Documentation

org.codehaus.groovy.ast.expr
[Java] Class Expression

java.lang.Object
  org.codehaus.groovy.ast.ASTNode
      org.codehaus.groovy.ast.AnnotatedNode
          org.codehaus.groovy.ast.expr.Expression

public abstract class Expression
extends AnnotatedNode

Represents a base class for expressions which evaluate as an object

Authors:
James Strachan
Version:
\$Revision\$


Method Summary
ClassNode getType()

void setType(ClassNode t)

Expression transformExpression(ExpressionTransformer transformer)

Return a copy of the expression calling the transformer on any nested expressions

protected java.util.List transformExpressions(java.util.List expressions, ExpressionTransformer transformer)

Transforms the list of expressions

protected java.util.List transformExpressions(java.util.List expressions, ExpressionTransformer transformer, java.lang.Class transformedType)

Transforms the list of expressions, and checks that all transformed expressions have the given type.

 
Methods inherited from class AnnotatedNode
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
 
Methods inherited from class ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getText, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

getType

public ClassNode getType()


setType

public void setType(ClassNode t)


transformExpression

public Expression transformExpression(ExpressionTransformer transformer)
Return a copy of the expression calling the transformer on any nested expressions
Parameters:
transformer


transformExpressions

protected java.util.List transformExpressions(java.util.List expressions, ExpressionTransformer transformer)
Transforms the list of expressions
Returns:
a new list of transformed expressions


transformExpressions

protected java.util.List transformExpressions(java.util.List expressions, ExpressionTransformer transformer, java.lang.Class transformedType)
Transforms the list of expressions, and checks that all transformed expressions have the given type.
Returns:
a new list of transformed expressions


 

Groovy Documentation