public class Main
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Global |
global |
static ShellContextFactory |
shellContextFactory |
Constructor and Description |
---|
Main() |
Modifier and Type | Method and Description |
---|---|
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) |
public static ShellContextFactory shellContextFactory
public static Global global
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 readRhinoException
- thrown during evaluation of sourcepublic 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.IOException
public 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)
Copyright © 2010 - 2020 Adobe. All Rights Reserved