Compilable
Interface Compilable
public interface Compilable
The optional interface implemented by ScriptEngines whose methods compile scripts to a form that can be executed repeatedly without recompilation.
- Since:
- 1.6
Methods
compile
CompiledScript compile(String script) throws ScriptException
Compiles the script (source represented as a String
) for later execution.
- Parameters:
-
script
- The source of the script, represented as aString
. - Returns:
- An instance of a subclass of
CompiledScript
to be executed later using one of theeval
methods ofCompiledScript
. - Throws:
-
ScriptException
- if compilation