Package org.mozilla.javascript.tools.shell

Examples of org.mozilla.javascript.tools.shell.QuitAction


    public void init(Context cx, RhinoEngine engine, boolean sealed) {
        // Define some global functions particular to the shell. Note
        // that these functions are not part of ECMA.
        initStandardObjects(cx, sealed);
        initQuitAction(new QuitAction() {
            public void quit(Context cx, int exitCode) {
                System.exit(exitCode);
            }
        });
        String[] names = {
View Full Code Here


     */
    public ExitStatus exec(File mainScript, final String[] args, final ErrorReporter reporter) {
      final ExitStatus status = new ExitStatus();
        if(!global.isInitialized()) {
            global.init(contextFactory);
            global.initQuitAction(new QuitAction() {
                @Override
                public void quit(Context context, int exitCode) {
                  status.setExitCode(exitCode);
                }
            });
View Full Code Here

TOP

Related Classes of org.mozilla.javascript.tools.shell.QuitAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.