Package org.python.jsr223
Class MyPyScriptEngine
java.lang.Object
javax.script.AbstractScriptEngine
org.python.jsr223.MyPyScriptEngine
- All Implemented Interfaces:
AutoCloseable,Compilable,Invocable,ScriptEngine
public class MyPyScriptEngine
extends AbstractScriptEngine
implements Compilable, Invocable, AutoCloseable
-
Field Summary
Fields inherited from class javax.script.AbstractScriptEngine
contextFields inherited from interface javax.script.ScriptEngine
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()eval(Reader reader, ScriptContext context) eval(String script, ScriptContext context) <T> TgetInterface(Class<T> clazz) <T> TgetInterface(Object obj, Class<T> clazz) org.python.util.PythonInterpreterinvokeFunction(String name, Object... args) invokeMethod(Object thiz, String name, Object... args) Methods inherited from class javax.script.AbstractScriptEngine
eval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext
-
Constructor Details
-
MyPyScriptEngine
-
-
Method Details
-
getPythonInterpreter
public org.python.util.PythonInterpreter getPythonInterpreter() -
eval
- Specified by:
evalin interfaceScriptEngine- Throws:
ScriptException
-
eval
- Specified by:
evalin interfaceScriptEngine- Throws:
ScriptException
-
createBindings
- Specified by:
createBindingsin interfaceScriptEngine
-
getFactory
- Specified by:
getFactoryin interfaceScriptEngine
-
compile
- Specified by:
compilein interfaceCompilable- Throws:
ScriptException
-
compile
- Specified by:
compilein interfaceCompilable- Throws:
ScriptException
-
invokeMethod
public Object invokeMethod(Object thiz, String name, Object... args) throws ScriptException, NoSuchMethodException - Specified by:
invokeMethodin interfaceInvocable- Throws:
ScriptExceptionNoSuchMethodException
-
invokeFunction
public Object invokeFunction(String name, Object... args) throws ScriptException, NoSuchMethodException - Specified by:
invokeFunctionin interfaceInvocable- Throws:
ScriptExceptionNoSuchMethodException
-
getInterface
- Specified by:
getInterfacein interfaceInvocable
-
getInterface
- Specified by:
getInterfacein interfaceInvocable
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getLocalNames
-