Class CpsClosure2
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.Closure
com.cloudbees.groovy.cps.impl.CpsClosure
org.jenkinsci.plugins.workflow.cps.CpsClosure2
- All Implemented Interfaces:
groovy.lang.GroovyCallable
,groovy.lang.GroovyObject
,Serializable
,Cloneable
,Runnable
,Callable
CpsClosure
that intercepts the sleep
call so that it gets handled via SleepStep,
instead of DefaultGroovyStaticMethods.sleep(Object, long)
that Groovy adds to Object
.
We have to do this because the sleep
step (intentionally) picks the same name
as a method defined on Object
, which CpsScript.sleep(long)
delegates.
Granted, it is a method added by Groovy, not by JDK, but the end result is still the same,
and the consequence is as severe as trying to override hashCode()
method and use it for something completely different.
(At the time a bug masked the severity of the problem.)
- 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
-
Method Summary
Methods inherited from class com.cloudbees.groovy.cps.impl.CpsClosure
call, call, call, doCall
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
-
Constructor Details
-
CpsClosure2
-
-
Method Details
-
sleep
- See Also:
-
println
-
println
public void println() -
print
-
printf
-