org.codehaus.groovy.runtime
Class MethodClosure
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.Closure
org.codehaus.groovy.runtime.MethodClosure
- All Implemented Interfaces:
- GroovyObject, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable
public class MethodClosure
- extends Closure
Represents a method on an object using a closure which can be invoked
at any time
- Version:
- $Revision: 13053 $
- Author:
- James Strachan
- See Also:
- Serialized Form
Field Summary |
private java.lang.String |
method
|
Constructor Summary |
MethodClosure(java.lang.Object owner,
java.lang.String method)
|
Method Summary |
protected java.lang.Object |
doCall(java.lang.Object arguments)
|
java.lang.String |
getMethod()
|
java.lang.Object |
getProperty(java.lang.String property)
Retrieves a property value. |
Methods inherited from class groovy.lang.Closure |
asWritable, call, call, call, clone, curry, getDelegate, getDirective, getMaximumNumberOfParameters, getOwner, getParameterTypes, getResolveStrategy, getThisObject, isCase, run, setDelegate, setDirective, setProperty, setResolveStrategy, throwRuntimeException |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
method
private java.lang.String method
MethodClosure
public MethodClosure(java.lang.Object owner,
java.lang.String method)
getMethod
public java.lang.String getMethod()
doCall
protected java.lang.Object doCall(java.lang.Object arguments)
getProperty
public java.lang.Object getProperty(java.lang.String property)
- Description copied from interface:
GroovyObject
- Retrieves a property value.
- Specified by:
getProperty
in interface GroovyObject
- Overrides:
getProperty
in class Closure
- Parameters:
property
- the name of the property of interest
- Returns:
- the given property
Copyright © ${year} The Codehaus. All Rights Reserved.