return &JavaObject_ops;
jobject java_obj; const char *member_name; JavaObjectWrapper *java_wrapper; JavaClassDescriptor *class_descriptor; JavaMemberDescriptor *member_descriptor; jsval idval; JNIEnv *jEnv; JSJavaThreadState *jsj_env; JSObject *proto_chain; JSJPropertyInfo prop_info; JSBool result;     jsj_env = jsj_EnterJava(cx, &jEnv); if (!jEnv) return JS_FALSE;  if (!lookup_member_by_id(cx, jEnv, obj, &java_wrapper, id, &member_descriptor, NULL, &proto_chain, &prop_info)) { jsj_ExitJava(jsj_env); return JS_FALSE; }   if (!member_descriptor) { if (proto_chain && (prop_info.attributes & JSPROP_SHARED)) { JS_SetProperty(cx, proto_chain, prop_info.name, vp); } else { JS_IdToValue(cx, id, &idval); if (!JSVAL_IS_STRING(idval)) goto no_such_field; member_name = JS_GetStringBytes(JSVAL_TO_STRING(idval)); if (strcmp(member_name, "__proto__")) goto no_such_field; if (!JSVAL_IS_OBJECT(*vp)) { JS_ReportErrorNumber(cx, jsj_GetErrorMessage, NULL, JSJMSG_BAD_PROTO_ASSIGNMENT); jsj_ExitJava(jsj_env); return JS_FALSE; } JS_SetPrototype(cx, obj, JSVAL_TO_OBJECT(*vp)); } jsj_ExitJava(jsj_env); return JS_TRUE; }   if (!member_descriptor->field) goto no_such_field;   if (member_descriptor->field->modifiers & ACC_FINAL) { jsj_ExitJava(jsj_env); return JS_TRUE; }  java_obj = java_wrapper->java_obj; result = jsj_SetJavaFieldValue(cx, jEnv, member_descriptor->field, java_obj, *vp); jsj_ExitJava(jsj_env); return result;  no_such_field: JS_IdToValue(cx, id, &idval); member_name = JS_GetStringBytes(JSVAL_TO_STRING(idval)); class_descriptor = java_wrapper->class_descriptor; JS_ReportErrorNumber(cx, jsj_GetErrorMessage, NULL, JSJMSG_NO_NAME_IN_CLASS, member_name, class_descriptor->name); jsj_ExitJava(jsj_env); return JS_FALSE;
JS_STATIC_DLL_CALLBACK(JSObjectOps *)JavaObject_getObjectOps(JSContext *cx, JSClass *clazz){    return &JavaObject_ops;}