Class ConvertedClosure

  • All Implemented Interfaces:, java.lang.reflect.InvocationHandler

    public class ConvertedClosure
    extends ConversionHandler
    This class is a general adapter to adapt a closure to any Java interface.
    See Also:
    Serialized Form
    • Constructor Detail

      • ConvertedClosure

        public ConvertedClosure​(Closure closure,
                                java.lang.String method)
        to create a ConvertedClosure object.
        closure - the closure object.
      • ConvertedClosure

        public ConvertedClosure​(Closure closure)
    • Method Detail

      • invokeCustom

        public java.lang.Object invokeCustom​(java.lang.Object proxy,
                                             java.lang.reflect.Method method,
                                             java.lang.Object[] args)
                                      throws java.lang.Throwable
        Description copied from class: ConversionHandler
        This method is called for all Methods not defined on Object. The delegate should be called here.
        Specified by:
        invokeCustom in class ConversionHandler
        proxy - the proxy
        method - the method
        args - the arguments
        the result of the invocation of the delegate
        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[])