Class CpsClosure

java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.Closure
com.cloudbees.groovy.cps.impl.CpsClosure
All Implemented Interfaces:
groovy.lang.GroovyCallable, groovy.lang.GroovyObject, Serializable, Cloneable, Runnable, Callable

public class CpsClosure extends groovy.lang.Closure
Closure whose code is CPS-transformed.
Author:
Kohsuke Kawaguchi
See Also:
  • Field Summary

    Fields inherited from class groovy.lang.Closure

    DELEGATE_FIRST, DELEGATE_ONLY, DONE, IDENTITY, maximumNumberOfParameters, OWNER_FIRST, OWNER_ONLY, parameterTypes, SKIP, TO_SELF
  • Constructor Summary

    Constructors
    Constructor
    Description
    CpsClosure(Object owner, Object thisObject, List<String> parameters, Block body, Env capture)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    call(Object arguments)
     
    call(Object... args)
     
    doCall(Object... args)
    ClosureWriter generates this function with actual argument types.

    Methods inherited from class groovy.lang.Closure

    asWritable, clone, curry, curry, dehydrate, getDelegate, getDirective, getMaximumNumberOfParameters, getOwner, getParameterTypes, getProperty, getResolveStrategy, getThisObject, isCase, leftShift, leftShift, memoize, memoizeAtLeast, memoizeAtMost, memoizeBetween, ncurry, ncurry, rcurry, rcurry, rehydrate, rightShift, run, setDelegate, setDirective, setProperty, setResolveStrategy, throwRuntimeException, trampoline, trampoline

    Methods inherited from class groovy.lang.GroovyObjectSupport

    getMetaClass, invokeMethod, setMetaClass

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • call

      public Object call()
      Specified by:
      call in interface Callable
      Overrides:
      call in class groovy.lang.Closure
    • call

      public Object call(Object... args)
      Overrides:
      call in class groovy.lang.Closure
    • call

      public Object call(Object arguments)
      Overrides:
      call in class groovy.lang.Closure
    • doCall

      public Object doCall(Object... args)
      ClosureWriter generates this function with actual argument types. Here we approximate by using varargs.

      CurriedClosure invokes this method directly (via MetaClassImpl.invokeMethod(Class, Object, String, Object[], boolean, boolean)