|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.javascript.ScriptableObject
org.mozilla.javascript.IdScriptableObject
org.mozilla.javascript.ImporterTopLevel
org.getopt.luke.plugins.Shell
public class Shell
The shell program. Can execute scripts interactively or in batch mode at the command line. An example of controlling the JavaScript engine.
Field Summary |
---|
Fields inherited from class org.mozilla.javascript.ScriptableObject |
---|
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST |
Fields inherited from interface org.mozilla.javascript.Scriptable |
---|
NOT_FOUND |
Constructor Summary | |
---|---|
Shell(java.io.PrintWriter stdout,
java.io.PrintWriter stderr,
java.io.InputStream stdin)
|
Method Summary | |
---|---|
void |
destroy()
|
java.lang.String |
getClassName()
|
org.mozilla.javascript.Context |
getContext()
|
void |
help()
Print a help message. |
static void |
load(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
Load and execute a set of JavaScript source files. |
static void |
print(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
Print the string values of its arguments. |
void |
processSource(org.mozilla.javascript.Context cx,
java.io.File filename)
Evaluate JavaScript source. |
void |
processSource(org.mozilla.javascript.Context cx,
java.lang.String script)
|
void |
prompt()
|
void |
quit()
Quit the shell. |
static double |
version(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
Get and set the language version. |
Methods inherited from class org.mozilla.javascript.ImporterTopLevel |
---|
execIdCall, findPrototypeId, get, has, importPackage, init, initPrototypeId, initStandardObjects |
Methods inherited from class org.mozilla.javascript.IdScriptableObject |
---|
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultPut, delete, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, getAttributes, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeMethod, initPrototypeValue, instanceIdInfo, put, setAttributes, setInstanceIdValue |
Methods inherited from class org.mozilla.javascript.ScriptableObject |
---|
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, equivalentValues, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, hasInstance, hasProperty, hasProperty, isConst, isGetterOrSetter, isSealed, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Shell(java.io.PrintWriter stdout, java.io.PrintWriter stderr, java.io.InputStream stdin)
Method Detail |
---|
public void destroy()
public java.lang.String getClassName()
getClassName
in interface org.mozilla.javascript.Scriptable
getClassName
in class org.mozilla.javascript.ImporterTopLevel
public void help()
public static void print(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)
public void quit()
public static double version(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)
public static void load(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)
public void prompt()
public org.mozilla.javascript.Context getContext()
public void processSource(org.mozilla.javascript.Context cx, java.io.File filename)
cx
- the current contextfilename
- the name of the file to compile, or null for interactive
mode.public void processSource(org.mozilla.javascript.Context cx, java.lang.String script)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |