FunctionObject fp = new FunctionObject(name, HopObject.hopObjCtor, global);  installConstructor(fp, op);
installConstructor(name, op);
    synchronized void initPrototype(Prototype prototype) {        // System.err.println ("FESI INIT PROTO "+prototype);        Scriptable op = null;        String name = prototype.getName();        // get the prototype's prototype if possible and necessary        Scriptable opp = null;        Prototype parent = prototype.getParentPrototype();        if (parent != null) {            // see if parent prototype is already registered. if not, register it            opp = getRawPrototype(parent.getName());            if (opp == null) {                initPrototype(parent);                opp = getRawPrototype(parent.getName());            }        }        if (!"global".equalsIgnoreCase(name) && !"hopobject".equalsIgnoreCase(name) &&                (opp == null)) {            if (app.isJavaPrototype(name)) {                opp = getRawPrototype("__javaobject__");            } else {                opp = getRawPrototype("hopobject");            }        }        // if prototype doesn't exist (i.e. is a standard prototype built by HopExtension), create it.        op = getRawPrototype(name);        if (op == null) {            try {                Context context = Context.getCurrentContext();                op = new HopObject(name); // context.newObject (global /*, "HopObject" */);                op.setPrototype(opp);                op.setParentScope(global);                op.put("prototypename", op, name);            } catch (Exception ignore) {                System.err.println("Error creating prototype: " + ignore);                ignore.printStackTrace();            }            putPrototype(name, op);        } else {            // set parent prototype just in case it has been changed            op.setPrototype(opp);        }        // Register a constructor for all types except global.        // This will first create a new prototyped hopobject and then calls        // the actual (scripted) constructor on it.        if (!"global".equalsIgnoreCase(name) && !"root".equalsIgnoreCase(name)) {            try {                FunctionObject fp = new FunctionObject(name, HopObject.hopObjCtor, global);                installConstructor(fp, op);            } catch (Exception ignore) {                System.err.println("Error adding ctor for " + name + ": " + ignore);                ignore.printStackTrace();            }        }    }