|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JavaFXScriptEngine
The interface to the JavaFX Script scripting engine API. Its use is
optional, as full script functionality is available via the javax.script
API. In addition to the full script API, this interface defines versions
of the eval
and compile
ScriptEngine
methods which take a DiagnosticListener
for accessing warning
and error diagnostics reported during script parsing.
Field Summary |
---|
Fields inherited from interface javax.script.ScriptEngine |
---|
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME |
Method Summary | |
---|---|
javax.script.CompiledScript |
compile(java.io.Reader script,
javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener)
Compiles the script (source read from Reader ) for later
execution. |
javax.script.CompiledScript |
compile(java.lang.String script,
javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener)
Compiles the script (source represented as a String ) for
later execution. |
java.lang.Object |
eval(java.io.Reader reader,
javax.script.Bindings bindings,
javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener)
Same as eval(String, Bindings) except that the source of
the script is provided as a Reader. |
java.lang.Object |
eval(java.io.Reader script,
javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener)
Same as eval(String) except that the source of
the script is provided as a Reader. |
java.lang.Object |
eval(java.io.Reader reader,
javax.script.ScriptContext context,
javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener)
Same as eval(String, ScriptContext, DiagnosticListener)
where the source of the script is read from a Reader. |
java.lang.Object |
eval(java.lang.String script,
javax.script.Bindings bindings,
javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener)
Executes the script using the Bindings argument as the
ENGINE_SCOPE Bindings of the ScriptEngine
during the script execution. |
java.lang.Object |
eval(java.lang.String script,
javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener)
Executes the specified script. |
java.lang.Object |
eval(java.lang.String script,
javax.script.ScriptContext context,
javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener)
Causes the immediate execution of the script whose source is the String passed as the first argument. |
Methods inherited from interface javax.script.ScriptEngine |
---|
createBindings, eval, eval, eval, eval, eval, eval, get, getBindings, getContext, getFactory, put, setBindings, setContext |
Methods inherited from interface javax.script.Compilable |
---|
compile, compile |
Methods inherited from interface javax.script.Invocable |
---|
getInterface, getInterface, invokeFunction, invokeMethod |
Method Detail |
---|
java.lang.Object eval(java.lang.String script, javax.script.ScriptContext context, javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener) throws javax.script.ScriptException
script
- The script to be executed by the script engine.context
- A ScriptContext
exposing sets of attributes in
different scopes. The meanings of the scopes
ScriptContext.GLOBAL_SCOPE
, and
ScriptContext.ENGINE_SCOPE
are defined in the
JSR-223 specification.listener
- A DiagnosticListener
to which warnings and
errors found during script parsing are reported.
ScriptException:
- if an error occurs in script. ScriptEngines
should create and throw ScriptException wrappers for checked
Exceptions thrown by underlying scripting implementations.
NullPointerException:
- if either argument is null.
javax.script.ScriptException
java.lang.Object eval(java.io.Reader reader, javax.script.ScriptContext context, javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener) throws javax.script.ScriptException
eval(String, ScriptContext, DiagnosticListener)
where the source of the script is read from a Reader.
reader
- The source of the script to be executed by the script engine.context
- A ScriptContext
exposing sets of attributes in
different scopes. The meanings of the scopes
ScriptContext.GLOBAL_SCOPE
, and
ScriptContext.ENGINE_SCOPE
are defined in the
JSR-223 specification.listener
- A DiagnosticListener
to which warnings and
errors found during script parsing are reported.
ScriptException:
- if an error occurs in script. ScriptEngines
should create and throw ScriptException wrappers for checked
Exceptions thrown by underlying scripting implementations.
NullPointerException:
- if either argument is null.
javax.script.ScriptException
java.lang.Object eval(java.lang.String script, javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener) throws javax.script.ScriptException
ScriptContext
for the ScriptEngine
is used.
script
- The script to be executed by the script engine.listener
- A DiagnosticListener
to which warnings and
errors found during script parsing are reported.
ScriptException:
- if an error occurs in script. ScriptEngines
should create and throw ScriptException wrappers for checked
Exceptions thrown by underlying scripting implementations.
NullPointerException:
- if either argument is null.
javax.script.ScriptException
java.lang.Object eval(java.io.Reader script, javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener) throws javax.script.ScriptException
eval(String)
except that the source of
the script is provided as a Reader.
script
- The script to be executed by the script engine.listener
- A DiagnosticListener
to which warnings and
errors found during script parsing are reported.
ScriptException:
- if an error occurs in script. ScriptEngines
should create and throw ScriptException wrappers for checked
Exceptions thrown by underlying scripting implementations.
NullPointerException:
- if either argument is null.
javax.script.ScriptException
java.lang.Object eval(java.lang.String script, javax.script.Bindings bindings, javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener) throws javax.script.ScriptException
Bindings
argument as the
ENGINE_SCOPE Bindings
of the ScriptEngine
during the script execution. The Reader
, Writer
and non-ENGINE_SCOPE Bindings
of the default
ScriptContext
are used. The ENGINE_SCOPE Bindings
of the ScriptEngine
is not changed, and its mappings are
unaltered by the script execution.
script
- The source for the script.bindings
- The Bindings of attributes to be used for script execution.
ScriptException:
- if an error occurrs in script.
NullPointerException:
- if either argument is null.
javax.script.ScriptException
java.lang.Object eval(java.io.Reader reader, javax.script.Bindings bindings, javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener) throws javax.script.ScriptException
eval(String, Bindings)
except that the source of
the script is provided as a Reader.
reader
- The source for the script.bindings
- The Bindings of attributes to be used for script execution.
ScriptException:
- if an error occurrs in script.
NullPointerException:
- if either argument is null.
javax.script.ScriptException
javax.script.CompiledScript compile(java.lang.String script, javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener) throws javax.script.ScriptException
String
) for
later execution.
script
- The source of the script, represented as a String
.listener
- A DiagnosticListener
to which warnings and
errors found during script parsing are reported.
CompiledScript
to be executed later
using one of the eval methods of CompiledScript
.
ScriptException:
- if compilation fails.
NullPointerException:
- if the argument is null.
javax.script.ScriptException
javax.script.CompiledScript compile(java.io.Reader script, javax.tools.DiagnosticListener<javax.tools.JavaFileObject> listener) throws javax.script.ScriptException
Reader
) for later
execution. Functionality is identical to compile(String)
other than the way in which the source is passed.
script
- The reader from which the script source is obtained.listener
- A DiagnosticListener
to which warnings and
errors found during script parsing are reported.
CompiledScript
to be executed later
using one of the eval methods of CompiledScript
.
ScriptException:
- if compilation fails.
NullPointerException:
- if the argument is null.
javax.script.ScriptException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |