ScriptEvaluator strategy interface.
GroovyShell#evaluate(String, String)
| Modifier and Type | Field and Description |
|---|---|
| private ClassLoader | |
| private CompilerConfiguration |
| Access | Constructor and Description |
|---|---|
| public | |
| public | GroovyScriptEvaluator(ClassLoader
the ClassLoader to use as a parent for the classLoader)GroovyShellConstruct a new GroovyScriptEvaluator. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | evaluate(ScriptSource
the ScriptSource for the script to evaluate script)Implements org. Evaluate the given script. |
| public Object | evaluate(ScriptSource
the ScriptSource for the script to evaluate script, Map<String, Object> the key-value pairs to expose to the script,
typically as script variables (may be arguments)null or empty)Implements org. Evaluate the given script with the given arguments. |
| public CompilerConfiguration | |
| public void | setBeanClassLoader(ClassLoader
the owning class loader classLoader)Implements org. Callback that supplies the bean |
| public void | setCompilationCustomizers(CompilationCustomizer... compilationCustomizers)
Set one or more customizers to be applied to this evaluator's compiler configuration. |
| public void | setCompilerConfiguration(CompilerConfiguration compilerConfiguration)
Set a custom compiler configuration for this evaluator. |
| classLoader | back to summary |
|---|---|
| private ClassLoader classLoader
| |
| compilerConfiguration | back to summary |
|---|---|
| private CompilerConfiguration compilerConfiguration | |
| GroovyScriptEvaluator | back to summary |
|---|---|
| public GroovyScriptEvaluator() Construct a new GroovyScriptEvaluator. | |
| GroovyScriptEvaluator | back to summary |
|---|---|
| public GroovyScriptEvaluator(ClassLoader classLoader) Construct a new GroovyScriptEvaluator.
| |
| evaluate | back to summary |
|---|---|
| public Object evaluate(ScriptSource script) Implements org. Doc from org. Evaluate the given script.
| |
| evaluate | back to summary |
|---|---|
| public Object evaluate(ScriptSource script, Map<String, Object> arguments) Implements org. Doc from org. Evaluate the given script with the given arguments. | |
| getCompilerConfiguration | back to summary |
|---|---|
| public CompilerConfiguration getCompilerConfiguration() Return this evaluator's compiler configuration (never
| |
| setBeanClassLoader | back to summary |
|---|---|
| public void setBeanClassLoader(ClassLoader classLoader) Implements org. Doc from org. Callback that supplies the bean Invoked after the population of normal bean properties but
before an initialization callback such as
| |
| setCompilationCustomizers | back to summary |
|---|---|
| public void setCompilationCustomizers(CompilationCustomizer... compilationCustomizers) Set one or more customizers to be applied to this evaluator's compiler configuration. Note that this modifies the shared compiler configuration held by this evaluator.
| |
| setCompilerConfiguration | back to summary |
|---|---|
| public void setCompilerConfiguration(CompilerConfiguration compilerConfiguration) Set a custom compiler configuration for this evaluator.
| |