Package org.codehaus.groovy.runtime
Class ConvertedClosure
java.lang.Object
org.codehaus.groovy.runtime.ConversionHandler
org.codehaus.groovy.runtime.ConvertedClosure
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.reflect.InvocationHandler
public class ConvertedClosure extends ConversionHandler implements java.io.Serializable
This class is a general adapter to adapt a closure to any Java interface.
- See Also:
- Serialized Form
- 
Constructor SummaryConstructors Constructor Description ConvertedClosure(Closure closure)ConvertedClosure(Closure closure, java.lang.String method)to create a ConvertedClosure object.
- 
Method SummaryModifier and Type Method Description java.lang.ObjectinvokeCustom(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)This method is called for all Methods not defined on Object.Methods inherited from class org.codehaus.groovy.runtime.ConversionHandlercheckMethod, equals, getDelegate, hashCode, invoke, isCoreObjectMethod, isDefaultMethod, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
- 
Constructor Details- 
ConvertedClosureto create a ConvertedClosure object.- Parameters:
- closure- the closure object.
 
- 
ConvertedClosure
 
- 
- 
Method Details- 
invokeCustompublic java.lang.Object invokeCustom(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.ThrowableDescription copied from class:ConversionHandlerThis method is called for all Methods not defined on Object. The delegate should be called here.- Specified by:
- invokeCustomin class- ConversionHandler
- Parameters:
- proxy- the proxy
- method- the method
- args- the arguments
- Returns:
- the result of the invocation of the delegate
- Throws:
- java.lang.Throwable- any exception causes by the delegate
- See Also:
- ConversionHandler.invoke(Object, Method, Object[]),- InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
 
 
-