engine.invoke(hobj, "constructor", args, ScriptingEngine.ARGS_WRAP_NONE);
engine.invoke(hobj, "__constructor__", args, ScriptingEngine.ARGS_WRAP_NONE);
    public static Object jsConstructor(Context cx, Object[] args,                                              Function ctorObj, boolean inNewExpr)                         throws EvaluatorException, ScriptingException {        RhinoEngine engine = (RhinoEngine) cx.getThreadLocal("engine");        RhinoCore core = engine.core;        String protoname = ((FunctionObject) ctorObj).getFunctionName();        // if this is a java object prototype, create a new java object        // of the given class instead of a HopObject.        if (core.app.isJavaPrototype(protoname)) {            String classname = core.app.getJavaClassForPrototype(protoname);            try {                Class clazz = Class.forName(classname);                // try to get the constructor matching our arguments                Class[] argsTypes = new Class[args.length];                for (int i=0; i<argsTypes.length; i++) {                    argsTypes[i] = args[i] == null ? null : args[i].getClass();                }                Constructor cnst = clazz.getConstructor(argsTypes);                // crate a new instance using the constructor                Object obj = cnst.newInstance(args);                return Context.toObject(obj, engine.global);            } catch (Exception x) {                System.err.println("Error in Java constructor: "+x);                throw new EvaluatorException(x.toString());            }        } else {            INode node = new helma.objectmodel.db.Node(protoname, protoname,                                                    core.app.getWrappedNodeManager());            Scriptable proto = core.getPrototype(protoname);            HopObject hobj = new HopObject(protoname, proto);            hobj.init(core, node);            if (proto != null) {                engine.invoke(hobj, "constructor", args, ScriptingEngine.ARGS_WRAP_NONE);            }            return hobj;        }    }