public class MyPyScriptEngine extends AbstractScriptEngine implements Compilable, Invocable, AutoCloseable
contextARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME| Constructor and Description |
|---|
MyPyScriptEngine(ScriptEngineFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
CompiledScript |
compile(Reader reader) |
CompiledScript |
compile(String script) |
Bindings |
createBindings() |
Object |
eval(String script,
ScriptContext context) |
ScriptEngineFactory |
getFactory() |
<T> T |
getInterface(Class<T> clazz) |
<T> T |
getInterface(Object obj,
Class<T> clazz) |
Object |
invokeFunction(String name,
Object... args) |
Object |
invokeMethod(Object thiz,
String name,
Object... args) |
eval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContextpublic MyPyScriptEngine(ScriptEngineFactory factory)
public Object eval(String script, ScriptContext context) throws ScriptException
eval in interface ScriptEngineScriptExceptionpublic Bindings createBindings()
createBindings in interface ScriptEnginepublic ScriptEngineFactory getFactory()
getFactory in interface ScriptEnginepublic CompiledScript compile(String script) throws ScriptException
compile in interface CompilableScriptExceptionpublic CompiledScript compile(Reader reader) throws ScriptException
compile in interface CompilableScriptExceptionpublic Object invokeMethod(Object thiz, String name, Object... args) throws ScriptException, NoSuchMethodException
invokeMethod in interface InvocableScriptExceptionNoSuchMethodExceptionpublic Object invokeFunction(String name, Object... args) throws ScriptException, NoSuchMethodException
invokeFunction in interface InvocableScriptExceptionNoSuchMethodExceptionpublic <T> T getInterface(Class<T> clazz)
getInterface in interface Invocablepublic <T> T getInterface(Object obj, Class<T> clazz)
getInterface in interface Invocablepublic void close()
close in interface AutoCloseable