public interface ScriptEngine
extends java.io.Closeable
| Modifier and Type | Method and Description |
|---|---|
default void |
close() |
<FactoryType> |
compile(java.lang.String name,
java.lang.String code,
ScriptContext<FactoryType> context,
java.util.Map<java.lang.String,java.lang.String> params)
Compiles a script.
|
java.lang.String |
getType()
The language name used in the script APIs to refer to this scripting backend.
|
java.lang.String getType()
<FactoryType> FactoryType compile(java.lang.String name,
java.lang.String code,
ScriptContext<FactoryType> context,
java.util.Map<java.lang.String,java.lang.String> params)
name - the name of the script. null if it is anonymous (inline). For a stored script, its the identifier.code - actual source of the scriptcontext - the context this script will be used forparams - compile-time parameters (such as flags to the compiler)ScriptContextdefault void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOException