Top Description Fields Constructors Methods
org.codehaus.groovy.runtime

public Class ConvertedClosure

extends ConversionHandler
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
groovy.lang.Closure, java.io.Serializable, java.lang.reflect.Method

This class is a general adapter to adapt a closure to any Java interface.

Field Summary

Modifier and TypeField and Description
private final String
private static final long

Constructor Summary

AccessConstructor and Description
public
ConvertedClosure(Closure<V>
the closure object.
closure
,
String method)

to create a ConvertedClosure object.

public

Method Summary

Modifier and TypeMethod and Description
public Object
invokeCustom(Object
the proxy
proxy
,
Method
the method
method
,
Object[]
the arguments
args
)

Implements abstract org.codehaus.groovy.runtime.ConversionHandler.invokeCustom.

This method is called for all Methods not defined on Object.
Inherited from org.codehaus.groovy.runtime.ConversionHandler:
checkMethodequalsgetDelegatehashCodeinvokeisCoreObjectMethodisDefaultMethodtoString

Field Detail

methodNameback to summary
private final String methodName
serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.codehaus.groovy.runtime.ConversionHandler.serialVersionUID.

Constructor Detail

ConvertedClosureback to summary
public ConvertedClosure(Closure<V> closure, String method)

to create a ConvertedClosure object.

Parameters
closure:Closure<V>

the closure object.

ConvertedClosureback to summary
public ConvertedClosure(Closure<V> closure)

Method Detail

invokeCustomback to summary
public Object invokeCustom(Object proxy, Method method, Object[] args) throws Throwable

Implements abstract org.codehaus.groovy.runtime.ConversionHandler.invokeCustom.

Doc from org.codehaus.groovy.runtime.ConversionHandler.invokeCustom.

This method is called for all Methods not defined on Object. The delegate should be called here.

Parameters
proxy:Object

the proxy

method:Method

the method

args:Object[]

the arguments

Returns:Object

the result of the invocation of the delegate

Annotations
@Override
Exceptions
Throwable:
any exception causes by the delegate