Package com.cloudbees.groovy.cps
Class TransformerConfiguration
java.lang.Object
com.cloudbees.groovy.cps.TransformerConfiguration
Switches that affect the behaviour of
CpsTransformer- Author:
- Kohsuke Kawaguchi
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.codehaus.groovy.ast.ClassNodewithClosureType(Class<? extends groovy.lang.Closure> c) withClosureType(org.codehaus.groovy.ast.ClassNode closureType) withSafepoint(Class clazz, String methodName) Inserts a safepoint into transformed program.
-
Constructor Details
-
TransformerConfiguration
public TransformerConfiguration()
-
-
Method Details
-
getClosureType
public org.codehaus.groovy.ast.ClassNode getClosureType() -
withClosureType
-
withClosureType
-
withSafepoint
Inserts a safepoint into transformed program.At every loop head and at the entry of a function, CPS-transformed program will call the specified no-arg static public method that returns void. This is useful to pause the execution of un-cooperative CPS transformed programs.
A safepoint method can run some computation and return normally to keep the CPS interpreter going, or it can suspend the execution of a program.
-