public abstract class GroovyShellDecorator extends Object implements ExtensionPoint
GroovyShell
used to run workflow scripts.ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static GroovyShellDecorator |
NULL
GroovyShellDecorator that doesn't do anything. |
Constructor and Description |
---|
GroovyShellDecorator() |
Modifier and Type | Method and Description |
---|---|
static ExtensionList<GroovyShellDecorator> |
all() |
void |
configureCompiler(CpsFlowExecution context,
org.codehaus.groovy.control.CompilerConfiguration cc)
Called with
CompilerConfiguration to provide opportunity to tweak the runtime environment further. |
void |
configureShell(CpsFlowExecution context,
groovy.lang.GroovyShell shell)
Called with a configured
GroovyShell to further tweak its behaviours. |
void |
customizeImports(CpsFlowExecution context,
org.codehaus.groovy.control.customizers.ImportCustomizer ic)
Called with
ImportCustomizer to auto-import more packages, etc. |
GroovyShellDecorator |
forTrusted()
Obtains a contextualized
GroovyShellDecorator used to decorate the trusted shell. |
public static final GroovyShellDecorator NULL
GroovyShellDecorator
that doesn't do anything.public void customizeImports(@CheckForNull CpsFlowExecution context, org.codehaus.groovy.control.customizers.ImportCustomizer ic)
ImportCustomizer
to auto-import more packages, etc.context
- null if GroovyShell
is created just to test the parsing of the script.public void configureCompiler(@CheckForNull CpsFlowExecution context, org.codehaus.groovy.control.CompilerConfiguration cc)
CompilerConfiguration
to provide opportunity to tweak the runtime environment further.context
- null if GroovyShell
is created just to test the parsing of the script.public void configureShell(@CheckForNull CpsFlowExecution context, groovy.lang.GroovyShell shell)
GroovyShell
to further tweak its behaviours.context
- null if GroovyShell
is created just to test the parsing of the script.public GroovyShellDecorator forTrusted()
GroovyShellDecorator
used to decorate the trusted shell.
By default, this method returns null decorator that doesn't do anything.
See classloader.md
for details.
public static ExtensionList<GroovyShellDecorator> all()
Copyright © 2016–2020. All rights reserved.