public class GroovyCompiledScript
extends CompiledScript
Used to represent compiled Groovy scripts. Such scripts may be executed repeatedly
by Groovy's ScriptEngine using the eval method without reparsing overheads.
Adapted from original by Mike Grogan and A. Sundararajan
| Constructor and description |
|---|
GroovyCompiledScript(GroovyScriptEngineImpl engine, Class<?> clazz)Creates a compiled-script wrapper for a Groovy class produced by an engine instance. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Object |
eval(ScriptContext context)Evaluates the compiled script with the supplied script context. |
|
public ScriptEngine |
getEngine()Returns the engine that produced this compiled script. |
Creates a compiled-script wrapper for a Groovy class produced by an engine instance.
engine - the engine that compiled the scriptclazz - the compiled script classEvaluates the compiled script with the supplied script context.
context - the execution context to useScriptReturns the engine that produced this compiled script.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.