public class JavaScriptEngine extends javax.script.AbstractScriptEngine implements javax.script.Compilable, javax.script.Invocable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PARENTLOADER |
| Constructor and Description |
|---|
JavaScriptEngine() |
| Modifier and Type | Method and Description |
|---|---|
javax.script.CompiledScript |
compile(java.io.Reader reader) |
javax.script.CompiledScript |
compile(java.lang.String script) |
javax.script.Bindings |
createBindings() |
java.lang.Object |
eval(java.io.Reader reader,
javax.script.ScriptContext ctx) |
java.lang.Object |
eval(java.lang.String str,
javax.script.ScriptContext ctx) |
javax.script.ScriptEngineFactory |
getFactory() |
<T> T |
getInterface(java.lang.Class<T> arg0) |
<T> T |
getInterface(java.lang.Object arg0,
java.lang.Class<T> arg1) |
java.lang.Object |
invokeFunction(java.lang.String arg0,
java.lang.Object... arg1) |
java.lang.Object |
invokeMethod(java.lang.Object thiz,
java.lang.String name,
java.lang.Object... args) |
public static final java.lang.String PARENTLOADER
public JavaScriptEngine()
public javax.script.CompiledScript compile(java.lang.String script) throws javax.script.ScriptException
compile in interface javax.script.Compilablejavax.script.ScriptExceptionpublic javax.script.CompiledScript compile(java.io.Reader reader) throws javax.script.ScriptException
compile in interface javax.script.Compilablejavax.script.ScriptExceptionpublic java.lang.Object eval(java.lang.String str, javax.script.ScriptContext ctx) throws javax.script.ScriptException
eval in interface javax.script.ScriptEnginejavax.script.ScriptExceptionpublic java.lang.Object eval(java.io.Reader reader, javax.script.ScriptContext ctx) throws javax.script.ScriptException
eval in interface javax.script.ScriptEnginejavax.script.ScriptExceptionpublic javax.script.ScriptEngineFactory getFactory()
getFactory in interface javax.script.ScriptEnginepublic javax.script.Bindings createBindings()
createBindings in interface javax.script.ScriptEnginepublic <T> T getInterface(java.lang.Class<T> arg0)
getInterface in interface javax.script.Invocablepublic <T> T getInterface(java.lang.Object arg0, java.lang.Class<T> arg1)
getInterface in interface javax.script.Invocablepublic java.lang.Object invokeFunction(java.lang.String arg0, java.lang.Object... arg1) throws javax.script.ScriptException, java.lang.NoSuchMethodException
invokeFunction in interface javax.script.Invocablejavax.script.ScriptExceptionjava.lang.NoSuchMethodExceptionpublic java.lang.Object invokeMethod(java.lang.Object thiz, java.lang.String name, java.lang.Object... args) throws javax.script.ScriptException, java.lang.NoSuchMethodException
invokeMethod in interface javax.script.Invocablejavax.script.ScriptExceptionjava.lang.NoSuchMethodException