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 |
---|---|
org.mozilla.javascript.Context |
getContext() |
String |
getSaveVariableName(String name)
Return a save name to be used for a variable.
|
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 |
reset()
Resets the script engine to a fresh state (removes all variables and code history).
|
void |
setDebugger(org.mozilla.javascript.debug.Debugger debugger) |
void |
setOptimizationLevel(int level) |
void |
terminateCurrent()
Stops the currently executed piece of code.
|
addExecutionListener, executeAsync, executeSync, extractArguments, getDescription, getErrorStream, getExecutedFile, getInputStream, getOutputStream, getStackTrace, getTerminateOnIdle, getVariable, getVariables, hasVariable, inject, injectUI, isIdle, removeExecutionListener, removeVariable, setCloseStreamsOnTerminate, setEngineDescription, setErrorStream, setInputStream, setOutputStream, setTerminateOnIdle, setVariable, terminate
addJobChangeListener, belongsTo, cancel, create, 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 void setOptimizationLevel(int level)
public org.mozilla.javascript.Context getContext()
public void terminateCurrent()
IScriptEngine
public void setDebugger(org.mozilla.javascript.debug.Debugger debugger)
public void registerJar(URL url)
IScriptEngine
url
- url to load jar file frompublic void reset()
IScriptEngine
reset
in interface IScriptEngine
reset
in class AbstractScriptEngine
public String getSaveVariableName(String name)
IScriptEngine
name
- variable name candidate