public class CosaScriptEngine
extends javax.script.AbstractScriptEngine
implements javax.script.ScriptEngine, javax.script.Compilable, javax.script.Invocable
Constructor and Description |
---|
CosaScriptEngine(javax.script.ScriptEngineFactory factory) |
Modifier and Type | Method and Description |
---|---|
javax.script.CompiledScript |
compile(java.io.Reader script) |
javax.script.CompiledScript |
compile(java.lang.String script) |
javax.script.Bindings |
createBindings() |
java.lang.Object |
eval(java.io.Reader source,
javax.script.ScriptContext context) |
java.lang.Object |
eval(java.lang.String source,
javax.script.ScriptContext context) |
javax.script.ScriptEngineFactory |
getFactory() |
<T> T |
getInterface(java.lang.Class<T> clasz) |
<T> T |
getInterface(java.lang.Object thiz,
java.lang.Class<T> clasz) |
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) |
eval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext
public CosaScriptEngine(javax.script.ScriptEngineFactory factory)
public javax.script.ScriptEngineFactory getFactory()
getFactory
in interface javax.script.ScriptEngine
public java.lang.Object eval(java.lang.String source, javax.script.ScriptContext context) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
javax.script.ScriptException
public java.lang.Object eval(java.io.Reader source, 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.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 script) 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> clasz)
getInterface
in interface javax.script.Invocable
public <T> T getInterface(java.lang.Object thiz, java.lang.Class<T> clasz)
getInterface
in interface javax.script.Invocable