|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.htmlunit.corejs.javascript.tools.shell.Main
public class Main
The shell program. Can execute scripts interactively or in batch mode at the command line. An example of controlling the JavaScript engine.
| Field Summary | |
|---|---|
protected static ToolErrorReporter |
errorReporter
|
protected static int |
exitCode
|
static Global |
global
|
static ShellContextFactory |
shellContextFactory
|
| Constructor Summary | |
|---|---|
Main()
|
|
| Method Summary | |
|---|---|
static int |
exec(java.lang.String[] origArgs)
Execute the given arguments, but don't System.exit at the end. |
static java.io.PrintStream |
getErr()
|
static Global |
getGlobal()
|
static java.io.InputStream |
getIn()
|
static java.io.PrintStream |
getOut()
|
static void |
main(java.lang.String[] args)
Main entry point. |
static void |
processFile(Context cx,
Scriptable scope,
java.lang.String filename)
|
static void |
processFileNoThrow(Context cx,
Scriptable scope,
java.lang.String filename)
|
static java.lang.String[] |
processOptions(java.lang.String[] args)
Parse arguments. |
static void |
processSource(Context cx,
java.lang.String filename)
Evaluate JavaScript source. |
static void |
setErr(java.io.PrintStream err)
|
static void |
setIn(java.io.InputStream in)
|
static void |
setOut(java.io.PrintStream out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static ShellContextFactory shellContextFactory
public static Global global
protected static ToolErrorReporter errorReporter
protected static int exitCode
| Constructor Detail |
|---|
public Main()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
public static int exec(java.lang.String[] origArgs)
public static Global getGlobal()
public static java.lang.String[] processOptions(java.lang.String[] args)
public static void processSource(Context cx,
java.lang.String filename)
throws java.io.IOException
cx - the current contextfilename - the name of the file to compile, or null for interactive mode.
java.io.IOException - if the source could not be read
RhinoException - thrown during evaluation of source
public static void processFileNoThrow(Context cx,
Scriptable scope,
java.lang.String filename)
public static void processFile(Context cx,
Scriptable scope,
java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionpublic static java.io.InputStream getIn()
public static void setIn(java.io.InputStream in)
public static java.io.PrintStream getOut()
public static void setOut(java.io.PrintStream out)
public static java.io.PrintStream getErr()
public static void setErr(java.io.PrintStream err)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||