installConstructor(name, op);
FunctionObject fo = new FunctionObject(name, HopObject.hopObjCtor, global); fo.addAsConstructor(global, op);
    private synchronized void initPrototype(Prototype prototype) {        String name = prototype.getName();        String lowerCaseName = prototype.getLowerCaseName();        TypeInfo type = (TypeInfo) prototypes.get(lowerCaseName);        // check if the prototype info exists already        ScriptableObject op = (type == null) ? null : type.objProto;        // if prototype info doesn't exist (i.e. is a standard prototype        // built by HopExtension), create it.        if (op == null) {            if ("global".equals(lowerCaseName)) {                op = global;            } else if ("hopobject".equals(lowerCaseName)) {                op = hopObjectProto;            } else {                op = new HopObject(name);                op.setParentScope(global);            }            type = registerPrototype(prototype, op);        }        // 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".equals(lowerCaseName)) {            try {                installConstructor(name, op);            } catch (Exception ignore) {                System.err.println("Error adding ctor for " + name + ": " + ignore);                ignore.printStackTrace();            }        }    }