## org.codehaus.groovy.runtime
Class MethodClosure

    java.lang.Object
      groovy.lang.GroovyObjectSupport
          groovy.lang.Closure
              org.codehaus.groovy.runtime.MethodClosure

All Implemented Interfaces:
  GroovyObject, Cloneable, Runnable

    public class MethodClosure

extends Closure

Represents a method on an object using a closure which can be invoked at any time

Version:
  $Revision: 9556 $
Author:
  James Strachan

Field Summary

Fields inherited from class groovy.lang.Closure
`DELEGATE_FIRST, DELEGATE_ONLY, DONE, maximumNumberOfParameters, OWNER_FIRST, OWNER_ONLY, parameterTypes, SKIP, TO_SELF`

Constructor Summary
`MethodClosure(Object owner, String method)`

Method Summary
`protected Object` `doCall(Object arguments)`
`String` `getMethod()`
`Object` `getProperty(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 groovy.lang.GroovyObjectSupport
`getMetaClass, invokeMethod, setMetaClass`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MethodClosure

    public MethodClosure(Object owner,
                         String method)

Method Detail

### getMethod

    public String getMethod()

### doCall

    protected Object doCall(Object arguments)

### getProperty

    public Object getProperty(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 © 2003-2008 The Codehaus. All rights reserved.