## org.codehaus.groovy.runtime.metaclass
Class ClosureMetaMethod

A MetaMethod that accepts a closure in the constructor which is invoked when the MetaMethod is called. The delegate of the closure is set to the instance that the MetaMethod is invoked on when called.

author:
  Graeme Rocher

since:
  1.1

Field Summary
`Closure` | `callable`
`CachedClass` | `declaringClass`
`String` | `name`

Constructor Summary
`ClosureMetaMethod(String name, Closure c)`
`ClosureMetaMethod(String name, Class declaringClass, Closure c)`

Method Summary
`Closure` | `getClosure()` Retrieves the closure that is invoked by this MetaMethod
`CachedClass` | `getDeclaringClass()`
`int` | `getModifiers()`
`String` | `getName()`
`Class` | `getReturnType()`
`Object` | `invoke(Object object, def arguments)`

Constructor Detail

### ClosureMetaMethod

    public ClosureMetaMethod(String name, Closure c)

### ClosureMetaMethod

    public ClosureMetaMethod(String name, Class declaringClass, Closure c)

Method Detail

### getClosure

    public Closure getClosure()

  Retrieves the closure that is invoked by this MetaMethod
  return:
    The closure

### getDeclaringClass

    public CachedClass getDeclaringClass()

### getModifiers

    public int getModifiers()

### getName

    public String getName()

### getReturnType

    public Class getReturnType()

### invoke

    public Object invoke(Object object, def arguments)