public class GroovyScript extends Object implements CompiledScript
This implementation pre-compiles the provided script. Any syntax errors in the source code will throw an exception during construction of the object.
| Modifier and Type | Class and Description |
|---|---|
static class |
GroovyScript.InnerListFactory |
static class |
GroovyScript.InnerMapFactory |
| Constructor and Description |
|---|
GroovyScript(String scriptName,
GroovyScriptEngineImpl groovyEngine) |
| Modifier and Type | Method and Description |
|---|---|
Object |
eval(Context context,
Bindings request,
Bindings... scopes)
Evaluated the script stored in this
CompiledScript object. |
Bindings |
prepareBindings(Context context,
Bindings request,
Bindings... scopes) |
public GroovyScript(String scriptName, GroovyScriptEngineImpl groovyEngine) throws IllegalAccessException, InstantiationException, groovy.util.ResourceException, groovy.util.ScriptException
IllegalAccessExceptionInstantiationExceptiongroovy.util.ResourceExceptiongroovy.util.ScriptExceptionpublic Bindings prepareBindings(Context context, Bindings request, Bindings... scopes)
prepareBindings in interface CompiledScriptpublic Object eval(Context context, Bindings request, Bindings... scopes) throws ScriptException
CompiledScriptCompiledScript object.
eval in interface CompiledScriptcontext - A context associated with the
Request.request - A ScriptContext that is used in the same way as
the ScriptContext passed to the eval
methods of ScriptEngine.scopes - Additional Bindings extending the request
with.null if no value is returned by the script
execution.ScriptException - if an error occurs.Copyright © 2025 Open Identity Platform Community. All rights reserved.