public class ComplexJavaScriptEngine
extends java.lang.Object
implements javax.script.ScriptEngine, java.io.Closeable
Constructor and Description |
---|
ComplexJavaScriptEngine(javax.script.ScriptEngine underlyingEngine) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
javax.script.Bindings |
createBindings() |
java.lang.Object |
eval(java.io.Reader reader) |
java.lang.Object |
eval(java.io.Reader reader,
javax.script.Bindings n) |
java.lang.Object |
eval(java.io.Reader reader,
javax.script.ScriptContext context) |
java.lang.Object |
eval(java.lang.String script) |
java.lang.Object |
eval(java.lang.String script,
javax.script.Bindings n) |
java.lang.Object |
eval(java.lang.String script,
javax.script.ScriptContext context) |
void |
executeAllScripts(boolean downloadAndExecuteRemoteScripts,
boolean executeInlineScriptTags)
Attempts to execute all scripts in the document (inside script tags)
|
java.lang.Object |
get(java.lang.String key) |
javax.script.Bindings |
getBindings(int scope) |
javax.script.ScriptContext |
getContext() |
javax.script.ScriptEngineFactory |
getFactory() |
void |
put(java.lang.String key,
java.lang.Object value) |
void |
setBindings(javax.script.Bindings bindings,
int scope) |
void |
setContext(javax.script.ScriptContext context) |
ComplexJavaScriptEngine(@NotNull javax.script.ScriptEngine underlyingEngine)
public java.lang.Object eval(java.lang.String script, javax.script.ScriptContext context) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
javax.script.ScriptException
public java.lang.Object eval(java.io.Reader reader, javax.script.ScriptContext context) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
javax.script.ScriptException
public java.lang.Object eval(java.lang.String script) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
javax.script.ScriptException
public java.lang.Object eval(java.io.Reader reader) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
javax.script.ScriptException
public java.lang.Object eval(java.lang.String script, javax.script.Bindings n) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
javax.script.ScriptException
public java.lang.Object eval(java.io.Reader reader, javax.script.Bindings n) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
javax.script.ScriptException
public void put(java.lang.String key, java.lang.Object value)
put
in interface javax.script.ScriptEngine
public java.lang.Object get(java.lang.String key)
get
in interface javax.script.ScriptEngine
public javax.script.Bindings getBindings(int scope)
getBindings
in interface javax.script.ScriptEngine
public void setBindings(javax.script.Bindings bindings, int scope)
setBindings
in interface javax.script.ScriptEngine
public javax.script.Bindings createBindings()
createBindings
in interface javax.script.ScriptEngine
public javax.script.ScriptContext getContext()
getContext
in interface javax.script.ScriptEngine
public void setContext(javax.script.ScriptContext context)
setContext
in interface javax.script.ScriptEngine
public javax.script.ScriptEngineFactory getFactory()
getFactory
in interface javax.script.ScriptEngine
public void executeAllScripts(boolean downloadAndExecuteRemoteScripts, boolean executeInlineScriptTags) throws javax.script.ScriptException
downloadAndExecuteRemoteScripts
- Whether or not to download and execute the remote scripts (those linked with an src attribute)executeInlineScriptTags
- Whether or not to run scripts that are written between the script tagsjavax.script.ScriptException
- On error executing all scripts inside the script engine (not a simple script error inside one of the scripts)public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException