com.cloudera.cdk.morphline.scriptengine.java
Class FastJavaScriptEngine
java.lang.Object
javax.script.AbstractScriptEngine
com.cloudera.cdk.morphline.scriptengine.java.FastJavaScriptEngine
- All Implemented Interfaces:
- Compilable, ScriptEngine
public class FastJavaScriptEngine
- extends AbstractScriptEngine
- implements Compilable
This is a fast script engine for Java programming language - I modified JSR
223 Java Scripting a little for some 100x less overhead for invoking "static" methods.
Methods inherited from class javax.script.AbstractScriptEngine |
eval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FastJavaScriptEngine
public FastJavaScriptEngine()
compile
public CompiledScript compile(String script,
String methodName,
Class[] parameterTypes)
throws ScriptException
- Throws:
ScriptException
compile
public CompiledScript compile(String script)
throws ScriptException
- Specified by:
compile
in interface Compilable
- Throws:
ScriptException
compile
public CompiledScript compile(Reader reader)
throws ScriptException
- Specified by:
compile
in interface Compilable
- Throws:
ScriptException
eval
public Object eval(String str,
ScriptContext ctx)
throws ScriptException
- Specified by:
eval
in interface ScriptEngine
- Throws:
ScriptException
eval
public Object eval(Reader reader,
ScriptContext ctx)
throws ScriptException
- Specified by:
eval
in interface ScriptEngine
- Throws:
ScriptException
getFactory
public ScriptEngineFactory getFactory()
- Specified by:
getFactory
in interface ScriptEngine
createBindings
public Bindings createBindings()
- Specified by:
createBindings
in interface ScriptEngine
Copyright © 2013–2014 Cloudera. All rights reserved.