/* 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
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
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 (jint)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
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 (jbool)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
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
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
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
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
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
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
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
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
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) return NULL;
		use_java_lang_Object_getClass(env, clazz);
		use_java_lang_Object_hashCode(env, clazz);
		use_java_lang_Object_equals(env, clazz);
		use_java_lang_Object_clone(env, clazz);
		use_java_lang_Object_toString(env, clazz);
		use_java_lang_Object_notify(env, clazz);
		use_java_lang_Object_notifyAll(env, clazz);
		use_java_lang_Object_wait(env, clazz);
		use_java_lang_Object_wait_1(env, clazz);
		use_java_lang_Object_wait_2(env, clazz);
		use_java_lang_Object_finalize(env, clazz);
		use_java_lang_Object_new(env, clazz);
		_globalclass_java_lang_Object = JRI_NewGlobalRef(env, clazz);
		return clazz;
	}
	else {
		return 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 = JRI_GetGlobalRef(env, _globalclass_java_lang_Object);
		unuse_java_lang_Object_getClass(env, clazz);
		unuse_java_lang_Object_hashCode(env, clazz);
		unuse_java_lang_Object_equals(env, clazz);
		unuse_java_lang_Object_clone(env, clazz);
		unuse_java_lang_Object_toString(env, clazz);
		unuse_java_lang_Object_notify(env, clazz);
		unuse_java_lang_Object_notifyAll(env, clazz);
		unuse_java_lang_Object_wait(env, clazz);
		unuse_java_lang_Object_wait_1(env, clazz);
		unuse_java_lang_Object_wait_2(env, clazz);
		unuse_java_lang_Object_finalize(env, clazz);
		unuse_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[] = {
		native_java_lang_Object_getClass,
		native_java_lang_Object_hashCode,
		native_java_lang_Object_clone,
		native_java_lang_Object_notify,
		native_java_lang_Object_notifyAll,
		native_java_lang_Object_wait,
		NULL
	};
	struct java_lang_Class* clazz = JRI_FindClass(env, classname_java_lang_Object);
	if (clazz != 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);
}

/* 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_PUBLIC_API(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_PUBLIC_API(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_PUBLIC_API(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_PUBLIC_API(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_PUBLIC_API(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_PUBLIC_API(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 */

#endif /* _implementing_java_lang_Object */

