Package org.jruby.embed.jsr223
Class JRubyEngine
java.lang.Object
org.jruby.embed.jsr223.JRubyEngine
- All Implemented Interfaces:
AutoCloseable,Compilable,Invocable,ScriptEngine
public class JRubyEngine
extends Object
implements AutoCloseable, Compilable, Invocable, ScriptEngine
Implementation of javax.script.ScriptEngine/Compilable/Invocable.
- Author:
- Yoko Harada <[email protected]>
-
Field Summary
Fields inherited from interface javax.script.ScriptEngine
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()eval(Reader reader, ScriptContext context) eval(String script, ScriptContext context) getBindings(int scope) <T> TgetInterface(Class<T> returnType) <T> TgetInterface(Object receiver, Class<T> returnType) protected ScriptContextgetScriptContext(Bindings bindings) invokeFunction(String method, Object... args) invokeMethod(Object receiver, String method, Object... args) voidvoidsetBindings(Bindings bindings, int scope) voidsetContext(ScriptContext context)
-
Method Details
-
compile
- Specified by:
compilein interfaceCompilable- Throws:
ScriptException
-
compile
- Specified by:
compilein interfaceCompilable- Throws:
ScriptException
-
eval
- Specified by:
evalin interfaceScriptEngine- Throws:
ScriptException
-
eval
- Specified by:
evalin interfaceScriptEngine- Throws:
ScriptException
-
eval
- Specified by:
evalin interfaceScriptEngine- Throws:
ScriptException
-
eval
- Specified by:
evalin interfaceScriptEngine- Throws:
ScriptException
-
eval
- Specified by:
evalin interfaceScriptEngine- Throws:
ScriptException
-
eval
- Specified by:
evalin interfaceScriptEngine- Throws:
ScriptException
-
getScriptContext
-
get
- Specified by:
getin interfaceScriptEngine
-
put
- Specified by:
putin interfaceScriptEngine
-
getBindings
- Specified by:
getBindingsin interfaceScriptEngine
-
setBindings
- Specified by:
setBindingsin interfaceScriptEngine
-
createBindings
- Specified by:
createBindingsin interfaceScriptEngine
-
getContext
- Specified by:
getContextin interfaceScriptEngine
-
setContext
- Specified by:
setContextin interfaceScriptEngine
-
getFactory
- Specified by:
getFactoryin interfaceScriptEngine
-
invokeMethod
public Object invokeMethod(Object receiver, String method, Object... args) throws ScriptException, NoSuchMethodException - Specified by:
invokeMethodin interfaceInvocable- Throws:
ScriptExceptionNoSuchMethodException
-
invokeFunction
public Object invokeFunction(String method, Object... args) throws ScriptException, NoSuchMethodException - Specified by:
invokeFunctionin interfaceInvocable- Throws:
ScriptExceptionNoSuchMethodException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getInterface
- Specified by:
getInterfacein interfaceInvocable
-
getInterface
- Specified by:
getInterfacein interfaceInvocable
-