public class MethodPointerExpression extends Expression
foo.&bar
which means find the method pointer for the bar
method on the foo
instance.
This is equivalent to:
foo.metaClass.getMethodPointer(foo, "bar")
Modifier and Type | Field and Description |
---|---|
protected Expression |
expression |
protected Expression |
methodName |
EMPTY_ARRAY
DOC_COMMENT
Constructor and Description |
---|
MethodPointerExpression(Expression expression,
Expression methodName) |
Modifier and Type | Method and Description |
---|---|
Expression |
getExpression() |
Expression |
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) |
setType, transformExpressions, transformExpressions
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, hashCode, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
copyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData
protected final Expression expression
protected final Expression methodName
public MethodPointerExpression(Expression expression, Expression methodName)
public Expression getExpression()
public Expression getMethodName()
public void visit(GroovyCodeVisitor visitor)
public Expression transformExpression(ExpressionTransformer transformer)
Expression
transformExpression
in class Expression
public ClassNode getType()
getType
in class Expression
public boolean isDynamic()
public Class getTypeClass()