use of org.mozilla.javascript.LazilyLoadedCtor in project scriptographer by scriptographer.
the class TopLevel method initStandardObjects.
public void initStandardObjects(Context cx, boolean sealed) {
super.initStandardObjects(cx, sealed);
for (int i = 0; i != topPackages.length; i += 2) new LazilyLoadedCtor(this, topPackages[i], topPackages[i + 1], false);
// define some global functions and objects:
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);
}
Aggregations