org.codehaus.groovy.ast.expr
Class MethodPointerExpression

java.lang.Object
  extended byorg.codehaus.groovy.ast.ASTNode
      extended byorg.codehaus.groovy.ast.expr.Expression
          extended byorg.codehaus.groovy.ast.expr.MethodPointerExpression

public class MethodPointerExpression
extends Expression

Represents a method pointer on an object such as foo.&bar which means find the method pointer on foo for the method called "bar" which is equivalent to foo.metaClass.getMethodPointer(foo, "bar")

Version:
$Revision: 1.5 $

Constructor Summary
MethodPointerExpression(Expression expression, String methodName)
           
 
Method Summary
 Expression getExpression()
           
 String getMethodName()
           
 String getText()
           
 ClassNode getType()
           
 Class getTypeClass()
           
 boolean isDynamic()
           
 Expression transformExpression(ExpressionTransformer transformer)
          Return a copy of the expression calling the transformer on any nested expressions
 void visit(GroovyCodeVisitor visitor)
           
 
Methods inherited from class org.codehaus.groovy.ast.expr.Expression
setType, transformExpressions
 
Methods inherited from class org.codehaus.groovy.ast.ASTNode
getColumnNumber, getLineNumber, setColumnNumber, setLineNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodPointerExpression

public MethodPointerExpression(Expression expression,
                               String methodName)
Method Detail

getExpression

public Expression getExpression()

getMethodName

public String getMethodName()

visit

public void visit(GroovyCodeVisitor visitor)
Overrides:
visit in class ASTNode

transformExpression

public Expression transformExpression(ExpressionTransformer transformer)
Description copied from class: Expression
Return a copy of the expression calling the transformer on any nested expressions

Specified by:
transformExpression in class Expression
Parameters:
transformer -
Returns:

getText

public String getText()
Overrides:
getText in class ASTNode

getType

public ClassNode getType()
Overrides:
getType in class Expression

isDynamic

public boolean isDynamic()

getTypeClass

public Class getTypeClass()


Copyright © 2003-2007 The Codehaus. All Rights Reserved.