Package org.codehaus.groovy.runtime
Class ConvertedClosure
java.lang.Object
org.codehaus.groovy.runtime.ConversionHandler
org.codehaus.groovy.runtime.ConvertedClosure
- All Implemented Interfaces:
 Serializable,InvocationHandler
This class is a general adapter to adapt a closure to any Java interface.
- See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionConvertedClosure(Closure closure) ConvertedClosure(Closure closure, String methodName)  - 
Method Summary
Modifier and TypeMethodDescriptioninvokeCustom(Object proxy, Method method, Object[] args) This method is called for all Methods not defined on Object.Methods inherited from class org.codehaus.groovy.runtime.ConversionHandler
checkMethod, equals, getDelegate, hashCode, invoke, isCoreObjectMethod, isDefaultMethod, toString 
- 
Constructor Details
- 
ConvertedClosure
- Throws:
 IllegalArgumentException- if closure is null
 - 
ConvertedClosure
- Throws:
 IllegalArgumentException- if closure is null
 
 - 
 - 
Method Details
- 
invokeCustom
Description copied from class:ConversionHandlerThis method is called for all Methods not defined on Object. The delegate should be called here.- Specified by:
 invokeCustomin classConversionHandler- Parameters:
 proxy- the proxymethod- the methodargs- the arguments- Returns:
 - the result of the invocation of the delegate
 - Throws:
 Throwable- any exception causes by the delegate- See Also:
 
 
 -