public class MyPyScriptEngine
extends javax.script.AbstractScriptEngine
implements javax.script.Compilable, javax.script.Invocable, java.lang.AutoCloseable
Constructor and Description |
---|
MyPyScriptEngine(javax.script.ScriptEngineFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
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.lang.String script,
javax.script.ScriptContext context) |
javax.script.ScriptEngineFactory |
getFactory() |
<T> T |
getInterface(java.lang.Class<T> clazz) |
<T> T |
getInterface(java.lang.Object obj,
java.lang.Class<T> clazz) |
java.util.List<java.lang.String> |
getLocalNames() |
PythonInterpreter |
getPythonInterpreter() |
java.lang.Object |
invokeFunction(java.lang.String name,
java.lang.Object... args) |
java.lang.Object |
invokeMethod(java.lang.Object thiz,
java.lang.String name,
java.lang.Object... args) |
public MyPyScriptEngine(javax.script.ScriptEngineFactory factory)
public PythonInterpreter getPythonInterpreter()
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 javax.script.Bindings createBindings()
createBindings
in interface javax.script.ScriptEngine
public javax.script.ScriptEngineFactory getFactory()
getFactory
in interface javax.script.ScriptEngine
public javax.script.CompiledScript compile(java.lang.String script) throws javax.script.ScriptException
compile
in interface javax.script.Compilable
javax.script.ScriptException
public javax.script.CompiledScript compile(java.io.Reader reader) throws javax.script.ScriptException
compile
in interface javax.script.Compilable
javax.script.ScriptException
public 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.Invocable
javax.script.ScriptException
java.lang.NoSuchMethodException
public java.lang.Object invokeFunction(java.lang.String name, java.lang.Object... args) throws javax.script.ScriptException, java.lang.NoSuchMethodException
invokeFunction
in interface javax.script.Invocable
javax.script.ScriptException
java.lang.NoSuchMethodException
public <T> T getInterface(java.lang.Class<T> clazz)
getInterface
in interface javax.script.Invocable
public <T> T getInterface(java.lang.Object obj, java.lang.Class<T> clazz)
getInterface
in interface javax.script.Invocable
public void close()
close
in interface java.lang.AutoCloseable
public java.util.List<java.lang.String> getLocalNames()