java.lang.AutoCloseable
, java.io.Closeable
public interface ScriptEngine
extends java.io.Closeable
Modifier and Type | Method | 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)ScriptContext
default void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
java.io.IOException