/* DO NOT EDIT THIS FILE - it is machine generated */
#include "jri.h"

/* Stubs for class java/lang/Object */

#ifdef IMPLEMENT_java_lang_Object
#define _implementing_java_lang_Object
#endif /* IMPLEMENT_java_lang_Object */
#define IMPLEMENT_java_lang_Object
#include "java_lang_Object.h"

#ifndef UNUSED_java_lang_Object_getClass
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_getClass = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(struct java_lang_Class *)
java_lang_Object_getClass(JRIEnv* env, struct java_lang_Object* self) {
	if (methodID_java_lang_Object_getClass == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method getClass ()Ljava/lang/Class;");
	}
	return (struct java_lang_Class *)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_java_lang_Object_getClass);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_getClass */

#ifndef UNUSED_java_lang_Object_hashCode
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_hashCode = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jint)
java_lang_Object_hashCode(JRIEnv* env, struct java_lang_Object* self) {
	if (methodID_java_lang_Object_hashCode == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method hashCode ()I");
	}
	return JRI_CallMethodInt(env)(env, JRI_CallMethod_op, self, methodID_java_lang_Object_hashCode);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_hashCode */

#ifndef UNUSED_java_lang_Object_equals
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_equals = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
java_lang_Object_equals(JRIEnv* env, struct java_lang_Object* self, struct java_lang_Object *a) {
	if (methodID_java_lang_Object_equals == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method equals (Ljava/lang/Object;)Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_java_lang_Object_equals, a);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_equals */

#ifndef UNUSED_java_lang_Object_clone
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_clone = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(struct java_lang_Object *)
java_lang_Object_clone(JRIEnv* env, struct java_lang_Object* self) {
	if (methodID_java_lang_Object_clone == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method clone ()Ljava/lang/Object;");
	}
	return (struct java_lang_Object *)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_java_lang_Object_clone);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_clone */

#ifndef UNUSED_java_lang_Object_toString
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_toString = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(struct java_lang_String *)
java_lang_Object_toString(JRIEnv* env, struct java_lang_Object* self) {
	if (methodID_java_lang_Object_toString == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method toString ()Ljava/lang/String;");
	}
	return (struct java_lang_String *)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_java_lang_Object_toString);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_toString */

#ifndef UNUSED_java_lang_Object_notify
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_notify = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(void)
java_lang_Object_notify(JRIEnv* env, struct java_lang_Object* self) {
	if (methodID_java_lang_Object_notify == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method notify ()V");
	}
	(void)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_java_lang_Object_notify);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_notify */

#ifndef UNUSED_java_lang_Object_notifyAll
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_notifyAll = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(void)
java_lang_Object_notifyAll(JRIEnv* env, struct java_lang_Object* self) {
	if (methodID_java_lang_Object_notifyAll == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method notifyAll ()V");
	}
	(void)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_java_lang_Object_notifyAll);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_notifyAll */

#ifndef UNUSED_java_lang_Object_wait
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_wait = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(void)
java_lang_Object_wait(JRIEnv* env, struct java_lang_Object* self, jlong a) {
	if (methodID_java_lang_Object_wait == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method wait (J)V");
	}
	(void)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_java_lang_Object_wait, a);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_wait */

#ifndef UNUSED_java_lang_Object_wait_1
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_wait_1 = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(void)
java_lang_Object_wait_1(JRIEnv* env, struct java_lang_Object* self, jlong a, jint b) {
	if (methodID_java_lang_Object_wait_1 == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method wait (JI)V");
	}
	(void)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_java_lang_Object_wait_1, a, b);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_wait_1 */

#ifndef UNUSED_java_lang_Object_wait_2
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_wait_2 = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(void)
java_lang_Object_wait_2(JRIEnv* env, struct java_lang_Object* self) {
	if (methodID_java_lang_Object_wait_2 == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method wait ()V");
	}
	(void)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_java_lang_Object_wait_2);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_wait_2 */

#ifndef UNUSED_java_lang_Object_finalize
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_finalize = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(void)
java_lang_Object_finalize(JRIEnv* env, struct java_lang_Object* self) {
	if (methodID_java_lang_Object_finalize == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method finalize ()V");
	}
	(void)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_java_lang_Object_finalize);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_finalize */

#ifndef UNUSED_java_lang_Object_new
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_java_lang_Object_new = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(struct java_lang_Object*)
java_lang_Object_new(JRIEnv* env, struct java_lang_Class* clazz) {
	if (methodID_java_lang_Object_new == JRIUninitialized) {
		assert(!"Forgot to call use_java_lang_Object(env) before calling method <init> ()V");
	}
	return (struct java_lang_Object*)JRI_NewObject(env)(env, JRI_NewObject_op, clazz, methodID_java_lang_Object_new);
}
#endif /* DEBUG */
#endif /* UNUSED_java_lang_Object_new */

#ifndef UNUSED_use_java_lang_Object

static jglobal _globalclass_java_lang_Object = NULL;

JRI_PUBLIC_API(struct java_lang_Class*)
use_java_lang_Object(JRIEnv* env)
{
	if (_globalclass_java_lang_Object == NULL) {
		struct java_lang_Class* clazz = JRI_FindClass(env, classname_java_lang_Object);
		if (clazz == NULL) {
			JRI_ThrowNew(env, JRI_FindClass(env, "java/lang/ClassNotFoundException"), classname_java_lang_Object);
			return NULL;
		}
		usemethod_java_lang_Object_getClass(env, clazz);
		usemethod_java_lang_Object_hashCode(env, clazz);
		usemethod_java_lang_Object_equals(env, clazz);
		usemethod_java_lang_Object_clone(env, clazz);
		usemethod_java_lang_Object_toString(env, clazz);
		usemethod_java_lang_Object_notify(env, clazz);
		usemethod_java_lang_Object_notifyAll(env, clazz);
		usemethod_java_lang_Object_wait(env, clazz);
		usemethod_java_lang_Object_wait_1(env, clazz);
		usemethod_java_lang_Object_wait_2(env, clazz);
		usemethod_java_lang_Object_finalize(env, clazz);
		usemethod_java_lang_Object_new(env, clazz);
		_globalclass_java_lang_Object = JRI_NewGlobalRef(env, clazz);
		return clazz;
	}
	else {
		return (struct java_lang_Class*)JRI_GetGlobalRef(env, _globalclass_java_lang_Object);
	}
}

JRI_PUBLIC_API(void)
unuse_java_lang_Object(JRIEnv* env)
{
	if (_globalclass_java_lang_Object != NULL) {
		struct java_lang_Class* clazz = (struct java_lang_Class*)JRI_GetGlobalRef(env, _globalclass_java_lang_Object);
		unusemethod_java_lang_Object_getClass(env, clazz);
		unusemethod_java_lang_Object_hashCode(env, clazz);
		unusemethod_java_lang_Object_equals(env, clazz);
		unusemethod_java_lang_Object_clone(env, clazz);
		unusemethod_java_lang_Object_toString(env, clazz);
		unusemethod_java_lang_Object_notify(env, clazz);
		unusemethod_java_lang_Object_notifyAll(env, clazz);
		unusemethod_java_lang_Object_wait(env, clazz);
		unusemethod_java_lang_Object_wait_1(env, clazz);
		unusemethod_java_lang_Object_wait_2(env, clazz);
		unusemethod_java_lang_Object_finalize(env, clazz);
		unusemethod_java_lang_Object_new(env, clazz);
		JRI_DisposeGlobalRef(env, _globalclass_java_lang_Object);
		_globalclass_java_lang_Object = NULL;
		clazz = NULL;	/* prevent unused variable 'clazz' warning */
	}
}

#endif /* UNUSED_use_java_lang_Object */

#ifdef _implementing_java_lang_Object

JRI_PUBLIC_API(struct java_lang_Class*)
register_java_lang_Object(JRIEnv* env)
{
	char* nativeNamesAndSigs[] = {
		"getClass()Ljava/lang/Class;",
		"hashCode()I",
		"clone()Ljava/lang/Object;",
		"notify()V",
		"notifyAll()V",
		"wait(J)V",
		NULL
	};
	void* nativeProcs[] = {
		(void*)native_java_lang_Object_getClass,
		(void*)native_java_lang_Object_hashCode,
		(void*)native_java_lang_Object_clone,
		(void*)native_java_lang_Object_notify,
		(void*)native_java_lang_Object_notifyAll,
		(void*)native_java_lang_Object_wait,
		NULL
	};
	struct java_lang_Class* clazz = JRI_FindClass(env, classname_java_lang_Object);
	if (clazz == NULL) {
		JRI_ThrowNew(env, JRI_FindClass(env, "java/lang/ClassNotFoundException"), classname_java_lang_Object);
		return NULL;
	}
	JRI_RegisterNatives(env, clazz, nativeNamesAndSigs, nativeProcs);
	use_java_lang_Object(env);
	return clazz;
}

JRI_PUBLIC_API(void)
unregister_java_lang_Object(JRIEnv* env)
{
	struct java_lang_Class* clazz = JRI_FindClass(env, classname_java_lang_Object);
	JRI_UnregisterNatives(env, clazz);
	unuse_java_lang_Object(env);
}

#endif /* _implementing_java_lang_Object */

/* These stub routines are generated for compatibility with the JDK: */

#ifndef NO_JDK

/* SYMBOL: "java/lang/Object/getClass()Ljava/lang/Class;", Java_java_lang_Object_getClass_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_java_lang_Object_getClass_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	_P_[0].p = native_java_lang_Object_getClass(_EE_,_P_[0].p);
	return _P_ + 1;
}

/* SYMBOL: "java/lang/Object/hashCode()I", Java_java_lang_Object_hashCode_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_java_lang_Object_hashCode_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	_P_[0].i = native_java_lang_Object_hashCode(_EE_,_P_[0].p);
	return _P_ + 1;
}

/* SYMBOL: "java/lang/Object/clone()Ljava/lang/Object;", Java_java_lang_Object_clone_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_java_lang_Object_clone_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	_P_[0].p = native_java_lang_Object_clone(_EE_,_P_[0].p);
	return _P_ + 1;
}

/* SYMBOL: "java/lang/Object/notify()V", Java_java_lang_Object_notify_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_java_lang_Object_notify_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	(void) native_java_lang_Object_notify(_EE_,_P_[0].p);
	return _P_;
}

/* SYMBOL: "java/lang/Object/notifyAll()V", Java_java_lang_Object_notifyAll_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_java_lang_Object_notifyAll_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	(void) native_java_lang_Object_notifyAll(_EE_,_P_[0].p);
	return _P_;
}

/* SYMBOL: "java/lang/Object/wait(J)V", Java_java_lang_Object_wait_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_java_lang_Object_wait_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	JRI_JDK_Java8 _t1;
	(void) native_java_lang_Object_wait(_EE_,_P_[0].p,JRI_GET_INT64(_t1, _P_+1));
	return _P_;
}

#endif /* NO_JDK */

