Examples of defineFunctionProperties()


Examples of de.pdf_scrutinizer.API.app.Doc.defineFunctionProperties()

                        "printSeps",
                        "breakpoint", //dummy
                };
                //TODO: problem: no overloading allowed

                doc.defineFunctionProperties(names, Doc.class, ScriptableObject.DONTENUM);

                Scriptable scope = cx.initStandardObjects(doc);
                cx.putThreadLocal("topscope", scope);
                cx.putThreadLocal("scrutinizer", scrutinizer);
View Full Code Here

Examples of org.mozilla.javascript.NativeObject.defineFunctionProperties()

        if (context == null) {
            throw ScriptRuntime.constructError("Error",
                    "No context associated with current thread");
        }
        NativeObject wkt = (NativeObject) context.newObject(scope);
        wkt.defineFunctionProperties(new String[] { "read", "write" },
                WKT.class, ScriptableObject.PERMANENT);
        return wkt;
    }

}
View Full Code Here

Examples of org.mozilla.javascript.NativeObject.defineFunctionProperties()

        if (context == null) {
            throw ScriptRuntime.constructError("Error",
                    "No context associated with current thread");
        }
        NativeObject json = (NativeObject) context.newObject(scope);
        json.defineFunctionProperties(new String[] { "read", "write" },
                JSON.class, ScriptableObject.PERMANENT);
        return json;
    }

}
View Full Code Here

Examples of org.mozilla.javascript.ScriptableObject.defineFunctionProperties()

                                "readln",
                                "clearError",
                                "readAll"
                               };
        try {
            proto.defineFunctionProperties(fileFuncs, FileObject.class, 0);
        } catch (Exception ignore) {
            System.err.println ("Error defining function properties: "+ignore);
        }
    }
View Full Code Here

Examples of org.mozilla.javascript.ScriptableObject.defineFunctionProperties()

                "login", "cd", "mkdir", "lcd", "putFile",
                "putString", "getFile", "getString", "logout",
                "binary", "ascii"
                            };
        try {
            proto.defineFunctionProperties(ftpFuncs, FtpObject.class, 0);
        } catch (Exception ignore) {
            System.err.println ("Error defining function properties: "+ignore);
        }
    }
View Full Code Here

Examples of org.mozilla.javascript.ScriptableObject.defineFunctionProperties()

    String[] names = { "print", "evaluate" };
    defineFunctionProperties(names, TopLevel.class,
      ScriptableObject.DONTENUM);

    ScriptableObject objProto = (ScriptableObject) getObjectPrototype(this);
    objProto.defineFunctionProperties(new String[] {
        "dontEnum", "toJava", "print", "evaluate"
        }, TopLevel.class, DONTENUM);
  }

  public static void defineProperty(ScriptableObject obj, String name,
View Full Code Here

Examples of org.mozilla.javascript.tools.shell.Global.defineFunctionProperties()

        final Global global = new Global();
        final ByteArrayOutputStream out = new ByteArrayOutputStream();
        final PrintStream p = new PrintStream(out);
        global.setOut(p);
        global.setErr(p);
        global.defineFunctionProperties(
                new String[] { "options" }, ShellTest.class,
                ScriptableObject.DONTENUM | ScriptableObject.PERMANENT |
                  ScriptableObject.READONLY);
        final TestState testState = new TestState();
        if (jsFile.getName().endsWith("-n.js")) {
View Full Code Here

Examples of org.mozilla.javascript.tools.shell.Global.defineFunctionProperties()

        final Global global = new Global();
        final ByteArrayOutputStream out = new ByteArrayOutputStream();
        final PrintStream p = new PrintStream(out);
        global.setOut(p);
        global.setErr(p);
        global.defineFunctionProperties(
                new String[] { "options" }, ShellTest.class,
                ScriptableObject.DONTENUM | ScriptableObject.PERMANENT |
                  ScriptableObject.READONLY);
        // test suite expects keywords to be disallowed as identifiers
        shellContextFactory.setAllowReservedKeywords(false);
View Full Code Here

Examples of org.mozilla.javascript.tools.shell.Global.defineFunctionProperties()

        final Global global = new Global();
        final ByteArrayOutputStream out = new ByteArrayOutputStream();
        final PrintStream p = new PrintStream(out);
        global.setOut(p);
        global.setErr(p);
        global.defineFunctionProperties(
                new String[] { "options" }, ShellTest.class,
                ScriptableObject.DONTENUM | ScriptableObject.PERMANENT |
                  ScriptableObject.READONLY);
        // test suite expects keywords to be disallowed as identifiers
        shellContextFactory.setAllowReservedKeywords(false);
View Full Code Here

Examples of org.mozilla.javascript.tools.shell.Global.defineFunctionProperties()

        final Global global = new Global();
        final ByteArrayOutputStream out = new ByteArrayOutputStream();
        final PrintStream p = new PrintStream(out);
        global.setOut(p);
        global.setErr(p);
        global.defineFunctionProperties(
                new String[] { "options" }, ShellTest.class,
                ScriptableObject.DONTENUM | ScriptableObject.PERMANENT |
                  ScriptableObject.READONLY);
        // test suite expects keywords to be disallowed as identifiers
        shellContextFactory.setAllowReservedKeywords(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.