Save This Page
Home » Groovy-1.7.0 » org.codehaus » groovy » runtime » metaclass » [javadoc | source]
org.codehaus.groovy.runtime.metaclass
public class: ClosureMetaMethod [javadoc | source]
java.lang.Object
   groovy.lang.MetaMethod
      org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod

All Implemented Interfaces:
    groovy.lang.ClosureInvokingMethod

Direct Known Subclasses:
    MethodClosureMetaMethod

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.
Constructor:
 public ClosureMetaMethod(String name,
    Closure c,
    CachedMethod doCall) 
 public ClosureMetaMethod(String name,
    Class declaringClass,
    Closure c,
    CachedMethod doCall) 
Method from org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod Summary:
copy,   createMethodList,   getClosure,   getDeclaringClass,   getDoCall,   getModifiers,   getName,   getReturnType,   invoke
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod Detail:
 public static ClosureMetaMethod copy(ClosureMetaMethod closureMethod) 
 public static List<MetaMethod> createMethodList(String name,
    Class declaringClass,
    Closure closure) 
 public Closure getClosure() 
    Retrieves the closure that is invoked by this MetaMethod
 public CachedClass getDeclaringClass() 
 public CachedMethod getDoCall() 
 public int getModifiers() 
 public String getName() 
 public Class getReturnType() 
 public Object invoke(Object object,
    Object[] arguments)