Package org.teiid.query.eval
Class TeiidScriptEngine
- java.lang.Object
-
- javax.script.AbstractScriptEngine
-
- org.teiid.query.eval.TeiidScriptEngine
-
- All Implemented Interfaces:
Compilable
,ScriptEngine
public final class TeiidScriptEngine extends AbstractScriptEngine implements Compilable
A simplistic script engine that supports root variable access and 0-ary methods on the subsequent objects.
-
-
Field Summary
-
Fields inherited from class javax.script.AbstractScriptEngine
context
-
Fields inherited from interface javax.script.ScriptEngine
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME
-
-
Constructor Summary
Constructors Constructor Description TeiidScriptEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompiledScript
compile(Reader script)
CompiledScript
compile(String script)
Bindings
createBindings()
Object
eval(Reader reader, ScriptContext sc)
Object
eval(String script, ScriptContext sc)
ScriptEngineFactory
getFactory()
Map<String,Method>
getMethodMap(Class<?> clazz)
-
Methods inherited from class javax.script.AbstractScriptEngine
eval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext
-
-
-
-
Method Detail
-
createBindings
public Bindings createBindings()
- Specified by:
createBindings
in interfaceScriptEngine
-
compile
public CompiledScript compile(String script) throws ScriptException
- Specified by:
compile
in interfaceCompilable
- Throws:
ScriptException
-
getMethodMap
public Map<String,Method> getMethodMap(Class<?> clazz) throws ScriptException
- Throws:
ScriptException
-
compile
public CompiledScript compile(Reader script) throws ScriptException
- Specified by:
compile
in interfaceCompilable
- Throws:
ScriptException
-
getFactory
public ScriptEngineFactory getFactory()
- Specified by:
getFactory
in interfaceScriptEngine
-
eval
public Object eval(Reader reader, ScriptContext sc) throws ScriptException
- Specified by:
eval
in interfaceScriptEngine
- Throws:
ScriptException
-
eval
public Object eval(String script, ScriptContext sc) throws ScriptException
- Specified by:
eval
in interfaceScriptEngine
- Throws:
ScriptException
-
-