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

/* Stubs for class Blender3DPlugin */

#ifdef IMPLEMENT_Blender3DPlugin
#define _implementing_Blender3DPlugin
#endif /* IMPLEMENT_Blender3DPlugin */
#define IMPLEMENT_Blender3DPlugin
#include "Blender3DPlugin.h"

#ifndef UNUSED_Blender3DPlugin_new
JRIMethodID FAR methodID_Blender3DPlugin_new = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(struct Blender3DPlugin*)
Blender3DPlugin_new(JRIEnv* env, struct java_lang_Class* clazz) {
	if (methodID_Blender3DPlugin_new == JRIUninitialized) {
		assert(!"Forgot to call use_Blender3DPlugin(env) before calling method <init> ()V");
	}
	return (struct Blender3DPlugin*)JRI_NewObject(env)(env, JRI_NewObject_op, clazz, methodID_Blender3DPlugin_new);
}
#endif /* DEBUG */
#endif /* UNUSED_Blender3DPlugin_new */

#ifndef UNUSED_Blender3DPlugin_SendMessage
JRIMethodID FAR methodID_Blender3DPlugin_SendMessage = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(void)
Blender3DPlugin_SendMessage(JRIEnv* env, struct Blender3DPlugin* self, struct java_lang_String *a, struct java_lang_String *b, struct java_lang_String *c, struct java_lang_String *d) {
	if (methodID_Blender3DPlugin_SendMessage == JRIUninitialized) {
		assert(!"Forgot to call use_Blender3DPlugin(env) before calling method SendMessage (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
	}
	(void)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_Blender3DPlugin_SendMessage, a, b, c, d);
}
#endif /* DEBUG */
#endif /* UNUSED_Blender3DPlugin_SendMessage */

#ifndef UNUSED_Blender3DPlugin_blenderURL
JRIMethodID FAR methodID_Blender3DPlugin_blenderURL = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(void)
Blender3DPlugin_blenderURL(JRIEnv* env, struct Blender3DPlugin* self, struct java_lang_String *a) {
	if (methodID_Blender3DPlugin_blenderURL == JRIUninitialized) {
		assert(!"Forgot to call use_Blender3DPlugin(env) before calling method blenderURL (Ljava/lang/String;)V");
	}
	(void)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_Blender3DPlugin_blenderURL, a);
}
#endif /* DEBUG */
#endif /* UNUSED_Blender3DPlugin_blenderURL */

#ifndef UNUSED_use_Blender3DPlugin

static jglobal _globalclass_Blender3DPlugin = NULL;

JRI_PUBLIC_API(struct java_lang_Class*)
use_Blender3DPlugin(JRIEnv* env)
{
	if (_globalclass_Blender3DPlugin == NULL) {
		struct java_lang_Class* clazz = JRI_FindClass(env, classname_Blender3DPlugin);
		if (clazz == NULL) {
			JRI_ThrowNew(env, JRI_FindClass(env, "java/lang/ClassNotFoundException"), classname_Blender3DPlugin);
			return NULL;
		}
		use_Blender3DPlugin_new(env, clazz);
		use_Blender3DPlugin_SendMessage(env, clazz);
		use_Blender3DPlugin_blenderURL(env, clazz);
		_globalclass_Blender3DPlugin = JRI_NewGlobalRef(env, clazz);
		return clazz;
	}
	else {
		return JRI_GetGlobalRef(env, _globalclass_Blender3DPlugin);
	}
}

JRI_PUBLIC_API(void)
unuse_Blender3DPlugin(JRIEnv* env)
{
	if (_globalclass_Blender3DPlugin != NULL) {
		struct java_lang_Class* clazz = JRI_GetGlobalRef(env, _globalclass_Blender3DPlugin);
		unuse_Blender3DPlugin_new(env, clazz);
		unuse_Blender3DPlugin_SendMessage(env, clazz);
		unuse_Blender3DPlugin_blenderURL(env, clazz);
		JRI_DisposeGlobalRef(env, _globalclass_Blender3DPlugin);
		_globalclass_Blender3DPlugin = NULL;
		clazz = NULL;	/* prevent unused variable 'clazz' warning */
	}
}

#endif /* UNUSED_use_Blender3DPlugin */

#ifdef _implementing_Blender3DPlugin

JRI_PUBLIC_API(struct java_lang_Class*)
register_Blender3DPlugin(JRIEnv* env)
{
	char* nativeNamesAndSigs[] = {
		"SendMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V",
		"blenderURL(Ljava/lang/String;)V",
		NULL
	};
	void* nativeProcs[] = {
		(void*)native_Blender3DPlugin_SendMessage,
		(void*)native_Blender3DPlugin_blenderURL,
		NULL
	};
	struct java_lang_Class* clazz = JRI_FindClass(env, classname_Blender3DPlugin);
	if (clazz == NULL) {
		JRI_ThrowNew(env, JRI_FindClass(env, "java/lang/ClassNotFoundException"), classname_Blender3DPlugin);
		return NULL;
	}
	JRI_RegisterNatives(env, clazz, nativeNamesAndSigs, nativeProcs);
	use_Blender3DPlugin(env);
	return clazz;
}

JRI_PUBLIC_API(void)
unregister_Blender3DPlugin(JRIEnv* env)
{
	struct java_lang_Class* clazz = JRI_FindClass(env, classname_Blender3DPlugin);
	JRI_UnregisterNatives(env, clazz);
	unuse_Blender3DPlugin(env);
}

#endif /* _implementing_Blender3DPlugin */

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

#ifndef NO_JDK

/* SYMBOL: "Blender3DPlugin/SendMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", Java_Blender3DPlugin_SendMessage_stub */
JRI_PUBLIC_API(JRI_JDK_stack_item*)
Java_Blender3DPlugin_SendMessage_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	(void) native_Blender3DPlugin_SendMessage(_EE_,_P_[0].p,((_P_[1].p)),((_P_[2].p)),((_P_[3].p)),((_P_[4].p)));
	return _P_;
}

/* SYMBOL: "Blender3DPlugin/blenderURL(Ljava/lang/String;)V", Java_Blender3DPlugin_blenderURL_stub */
JRI_PUBLIC_API(JRI_JDK_stack_item*)
Java_Blender3DPlugin_blenderURL_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	(void) native_Blender3DPlugin_blenderURL(_EE_,_P_[0].p,((_P_[1].p)));
	return _P_;
}

#endif /* NO_JDK */

