org.codehaus.groovy.runtime
Class MethodClosure
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.Closure
org.codehaus.groovy.runtime.MethodClosure
- All Implemented Interfaces:
- Cloneable, GroovyObject, Runnable
- public class MethodClosure
- extends Closure
Represents a method on an object using a closure which can be invoked
at any time
- Version:
- $Revision: 1.6 $
- Author:
- James Strachan
Methods inherited from class groovy.lang.Closure |
asWritable, call, clone, curry, getDelegate, getDoCallMethod, getParameters, getParameterTypes, getProperty, invokeMethod, run, setDelegate, setProperty, throwRuntimeException |
MethodClosure
public MethodClosure(Object delegate)
MethodClosure
public MethodClosure(Object owner,
String method)
getMethod
public String getMethod()
call
public Object call(Object arguments)
- Description copied from class:
Closure
- Invokes the closure, returning any value if applicable.
- Overrides:
call
in class Closure
- Parameters:
arguments
- could be a single value or a List of values
- Returns:
- the value if applicable or null if there is no return statement in the closure
getMetaClass
public MetaClass getMetaClass()
- Specified by:
getMetaClass
in interface GroovyObject
- Overrides:
getMetaClass
in class GroovyObjectSupport
setMetaClass
public void setMetaClass(MetaClass metaClass)
- Description copied from interface:
GroovyObject
- Allows the MetaClass to be replaced with a derived implementation
- Specified by:
setMetaClass
in interface GroovyObject
- Overrides:
setMetaClass
in class GroovyObjectSupport
doCall
protected Object doCall(Object arguments)
Copyright © 2003-2004 The Codehaus. All Rights Reserved.