Class GroovyShellDecorator
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.cps.GroovyShellDecorator
-
- All Implemented Interfaces:
ExtensionPoint
public abstract class GroovyShellDecorator extends Object implements ExtensionPoint
Hook to customize the behaviour ofGroovyShell
used to run workflow scripts.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static GroovyShellDecorator
NULL
GroovyShellDecorator
that doesn't do anything.
-
Constructor Summary
Constructors Constructor Description GroovyShellDecorator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExtensionList<GroovyShellDecorator>
all()
void
configureCompiler(CpsFlowExecution context, org.codehaus.groovy.control.CompilerConfiguration cc)
Called withCompilerConfiguration
to provide opportunity to tweak the runtime environment further.void
configureShell(CpsFlowExecution context, groovy.lang.GroovyShell shell)
Called with a configuredGroovyShell
to further tweak its behaviours.void
customizeImports(CpsFlowExecution context, org.codehaus.groovy.control.customizers.ImportCustomizer ic)
Called withImportCustomizer
to auto-import more packages, etc.GroovyShellDecorator
forTrusted()
Obtains a contextualizedGroovyShellDecorator
used to decorate the trusted shell.
-
-
-
Field Detail
-
NULL
public static final GroovyShellDecorator NULL
GroovyShellDecorator
that doesn't do anything.
-
-
Method Detail
-
customizeImports
public void customizeImports(@CheckForNull CpsFlowExecution context, org.codehaus.groovy.control.customizers.ImportCustomizer ic)
Called withImportCustomizer
to auto-import more packages, etc.- Parameters:
context
- null ifGroovyShell
is created just to test the parsing of the script.
-
configureCompiler
public void configureCompiler(@CheckForNull CpsFlowExecution context, org.codehaus.groovy.control.CompilerConfiguration cc)
Called withCompilerConfiguration
to provide opportunity to tweak the runtime environment further.- Parameters:
context
- null ifGroovyShell
is created just to test the parsing of the script.
-
configureShell
public void configureShell(@CheckForNull CpsFlowExecution context, groovy.lang.GroovyShell shell)
Called with a configuredGroovyShell
to further tweak its behaviours.- Parameters:
context
- null ifGroovyShell
is created just to test the parsing of the script.
-
forTrusted
public GroovyShellDecorator forTrusted()
Obtains a contextualizedGroovyShellDecorator
used to decorate the trusted shell.By default, this method returns null decorator that doesn't do anything.
See
classloader.md
for details.
-
all
public static ExtensionList<GroovyShellDecorator> all()
-
-