public class RhinoJavaScriptEngine extends org.apache.sling.scripting.api.AbstractSlingScriptEngine implements Compilable
context
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME
Constructor and Description |
---|
RhinoJavaScriptEngine(ScriptEngineFactory factory,
org.mozilla.javascript.Scriptable rootScope,
org.apache.sling.scripting.api.ScriptCache scriptCache) |
Modifier and Type | Method and Description |
---|---|
CompiledScript |
compile(Reader scriptReader) |
CompiledScript |
compile(String script) |
Object |
eval(Reader scriptReader,
ScriptContext scriptContext) |
createBindings, eval, getFactory
eval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext
public RhinoJavaScriptEngine(ScriptEngineFactory factory, org.mozilla.javascript.Scriptable rootScope, org.apache.sling.scripting.api.ScriptCache scriptCache)
public CompiledScript compile(String script) throws ScriptException
compile
in interface Compilable
ScriptException
public CompiledScript compile(Reader scriptReader) throws ScriptException
compile
in interface Compilable
ScriptException
public Object eval(Reader scriptReader, ScriptContext scriptContext) throws ScriptException
eval
in interface ScriptEngine
ScriptException
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.