public class RhinoScriptEngine extends AbstractScriptEngine
Modifier and Type | Field and Description |
---|---|
static String |
ENGINE_ID |
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING
TRACE_SCRIPT_ENGINE
Constructor and Description |
---|
RhinoScriptEngine()
Creates a new Rhino interpreter.
|
Modifier and Type | Method and Description |
---|---|
static org.mozilla.javascript.Context |
getContext() |
ScriptStackTrace |
getExceptionStackTrace() |
String |
getSaveVariableName(String name)
Return a save name to be used for a variable.
|
org.mozilla.javascript.ScriptableObject |
getScope()
Method to get the global scope of this engine.
|
static Object |
getVariable(org.mozilla.javascript.Scriptable scope,
String name) |
static Map<String,Object> |
getVariables(org.mozilla.javascript.Scriptable scope) |
void |
registerJar(URL url)
Register a jar file and add it to the classpath.
|
void |
setOptimizationLevel(int level) |
void |
terminateCurrent()
Stops the currently executed piece of code.
|
addExecutionListener, addSecurityCheck, executeAsync, executeSync, extractArguments, getCurrentScriptEngine, getDescription, getErrorStream, getExecutedFile, getInputStream, getOutputStream, getStackTrace, getTerminateOnIdle, getVariable, getVariables, hasVariable, inject, injectUI, isFinished, isIdle, join, removeExecutionListener, removeSecurityCheck, removeVariable, setCloseStreamsOnTerminate, setEngineDescription, setErrorStream, setInputStream, setOutputStream, setTerminateOnIdle, setVariable, terminate
addJobChangeListener, belongsTo, cancel, create, create, createSystem, createSystem, done, getJobGroup, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, join, removeJobChangeListener, schedule, schedule, setJobGroup, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRule
getAdapter
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, schedule
getAdapter
public static final String ENGINE_ID
public static org.mozilla.javascript.Context getContext()
public void setOptimizationLevel(int level)
public ScriptStackTrace getExceptionStackTrace()
public void terminateCurrent()
IScriptEngine
public void registerJar(URL url)
IScriptEngine
url
- url to load jar file frompublic String getSaveVariableName(String name)
IScriptEngine
name
- variable name candidatepublic org.mozilla.javascript.ScriptableObject getScope()