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

/* Header for class java/lang/Class */

#ifndef _java_lang_Class_H_
#define _java_lang_Class_H_

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

struct java_lang_String;
struct java_lang_Class;
struct java_lang_Object;
struct java_lang_ClassLoader;
struct java_lang_Class;

/*******************************************************************************
 * Class java/lang/Class
 ******************************************************************************/

typedef struct java_lang_Class java_lang_Class;

#define classname_java_lang_Class	"java/lang/Class"

#define class_java_lang_Class(env) \
	((struct java_lang_Class*)JRI_FindClass(env, classname_java_lang_Class))

/*******************************************************************************
 * Public Methods
 ******************************************************************************/

#ifdef DEBUG

/*** public static native forName (Ljava/lang/String;)Ljava/lang/Class; ***/
extern JRI_PUBLIC_API(struct java_lang_Class *)
java_lang_Class_forName(JRIEnv* env, struct java_lang_Class* clazz, struct java_lang_String *a);

/*** public native newInstance ()Ljava/lang/Object; ***/
extern JRI_PUBLIC_API(struct java_lang_Object *)
java_lang_Class_newInstance(JRIEnv* env, struct java_lang_Class* self);

/*** public native getName ()Ljava/lang/String; ***/
extern JRI_PUBLIC_API(struct java_lang_String *)
java_lang_Class_getName(JRIEnv* env, struct java_lang_Class* self);

/*** public native getSuperclass ()Ljava/lang/Class; ***/
extern JRI_PUBLIC_API(struct java_lang_Class *)
java_lang_Class_getSuperclass(JRIEnv* env, struct java_lang_Class* self);

/*** public native getInterfaces ()[Ljava/lang/Class; ***/
extern JRI_PUBLIC_API(jref)
java_lang_Class_getInterfaces(JRIEnv* env, struct java_lang_Class* self);

/*** public native getClassLoader ()Ljava/lang/ClassLoader; ***/
extern JRI_PUBLIC_API(struct java_lang_ClassLoader *)
java_lang_Class_getClassLoader(JRIEnv* env, struct java_lang_Class* self);

/*** public native isInterface ()Z ***/
extern JRI_PUBLIC_API(jbool)
java_lang_Class_isInterface(JRIEnv* env, struct java_lang_Class* self);

/*** public toString ()Ljava/lang/String; ***/
extern JRI_PUBLIC_API(struct java_lang_String *)
java_lang_Class_toString(JRIEnv* env, struct java_lang_Class* self);

#else /* !DEBUG */

/*** public static native forName (Ljava/lang/String;)Ljava/lang/Class; ***/
#define java_lang_Class_forName(env, clazz, a) \
	((struct java_lang_Class *)JRI_CallStaticMethod(env)(env, JRI_CallStaticMethod_op, clazz, methodID_java_lang_Class_forName, a))

/*** public native newInstance ()Ljava/lang/Object; ***/
#define java_lang_Class_newInstance(env, obj) \
	((struct java_lang_Object *)JRI_CallMethod(env)(env, JRI_CallMethod_op, obj, methodID_java_lang_Class_newInstance))

/*** public native getName ()Ljava/lang/String; ***/
#define java_lang_Class_getName(env, obj) \
	((struct java_lang_String *)JRI_CallMethod(env)(env, JRI_CallMethod_op, obj, methodID_java_lang_Class_getName))

/*** public native getSuperclass ()Ljava/lang/Class; ***/
#define java_lang_Class_getSuperclass(env, obj) \
	((struct java_lang_Class *)JRI_CallMethod(env)(env, JRI_CallMethod_op, obj, methodID_java_lang_Class_getSuperclass))

/*** public native getInterfaces ()[Ljava/lang/Class; ***/
#define java_lang_Class_getInterfaces(env, obj) \
	((jref)JRI_CallMethod(env)(env, JRI_CallMethod_op, obj, methodID_java_lang_Class_getInterfaces))

/*** public native getClassLoader ()Ljava/lang/ClassLoader; ***/
#define java_lang_Class_getClassLoader(env, obj) \
	((struct java_lang_ClassLoader *)JRI_CallMethod(env)(env, JRI_CallMethod_op, obj, methodID_java_lang_Class_getClassLoader))

/*** public native isInterface ()Z ***/
#define java_lang_Class_isInterface(env, obj) \
	((jbool)JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, obj, methodID_java_lang_Class_isInterface))

/*** public toString ()Ljava/lang/String; ***/
#define java_lang_Class_toString(env, obj) \
	((struct java_lang_String *)JRI_CallMethod(env)(env, JRI_CallMethod_op, obj, methodID_java_lang_Class_toString))

#endif /* !DEBUG*/

/*** public static native forName (Ljava/lang/String;)Ljava/lang/Class; ***/
extern JRIMethodID FAR methodID_java_lang_Class_forName;
#define name_java_lang_Class_forName	"forName"
#define sig_java_lang_Class_forName 	"(Ljava/lang/String;)Ljava/lang/Class;"
#define use_java_lang_Class_forName(env, clazz)	\
	(methodID_java_lang_Class_forName =	\
		JRI_GetStaticMethodID(env, clazz,	\
			name_java_lang_Class_forName,	\
			sig_java_lang_Class_forName))
#define unuse_java_lang_Class_forName(env, clazz)	\
	(methodID_java_lang_Class_forName = JRIUninitialized)

/*** public native newInstance ()Ljava/lang/Object; ***/
extern JRIMethodID FAR methodID_java_lang_Class_newInstance;
#define name_java_lang_Class_newInstance	"newInstance"
#define sig_java_lang_Class_newInstance 	"()Ljava/lang/Object;"
#define use_java_lang_Class_newInstance(env, clazz)	\
	(methodID_java_lang_Class_newInstance =	\
		JRI_GetMethodID(env, clazz,	\
			name_java_lang_Class_newInstance,	\
			sig_java_lang_Class_newInstance))
#define unuse_java_lang_Class_newInstance(env, clazz)	\
	(methodID_java_lang_Class_newInstance = JRIUninitialized)

/*** public native getName ()Ljava/lang/String; ***/
extern JRIMethodID FAR methodID_java_lang_Class_getName;
#define name_java_lang_Class_getName	"getName"
#define sig_java_lang_Class_getName 	"()Ljava/lang/String;"
#define use_java_lang_Class_getName(env, clazz)	\
	(methodID_java_lang_Class_getName =	\
		JRI_GetMethodID(env, clazz,	\
			name_java_lang_Class_getName,	\
			sig_java_lang_Class_getName))
#define unuse_java_lang_Class_getName(env, clazz)	\
	(methodID_java_lang_Class_getName = JRIUninitialized)

/*** public native getSuperclass ()Ljava/lang/Class; ***/
extern JRIMethodID FAR methodID_java_lang_Class_getSuperclass;
#define name_java_lang_Class_getSuperclass	"getSuperclass"
#define sig_java_lang_Class_getSuperclass 	"()Ljava/lang/Class;"
#define use_java_lang_Class_getSuperclass(env, clazz)	\
	(methodID_java_lang_Class_getSuperclass =	\
		JRI_GetMethodID(env, clazz,	\
			name_java_lang_Class_getSuperclass,	\
			sig_java_lang_Class_getSuperclass))
#define unuse_java_lang_Class_getSuperclass(env, clazz)	\
	(methodID_java_lang_Class_getSuperclass = JRIUninitialized)

/*** public native getInterfaces ()[Ljava/lang/Class; ***/
extern JRIMethodID FAR methodID_java_lang_Class_getInterfaces;
#define name_java_lang_Class_getInterfaces	"getInterfaces"
#define sig_java_lang_Class_getInterfaces 	"()[Ljava/lang/Class;"
#define use_java_lang_Class_getInterfaces(env, clazz)	\
	(methodID_java_lang_Class_getInterfaces =	\
		JRI_GetMethodID(env, clazz,	\
			name_java_lang_Class_getInterfaces,	\
			sig_java_lang_Class_getInterfaces))
#define unuse_java_lang_Class_getInterfaces(env, clazz)	\
	(methodID_java_lang_Class_getInterfaces = JRIUninitialized)

/*** public native getClassLoader ()Ljava/lang/ClassLoader; ***/
extern JRIMethodID FAR methodID_java_lang_Class_getClassLoader;
#define name_java_lang_Class_getClassLoader	"getClassLoader"
#define sig_java_lang_Class_getClassLoader 	"()Ljava/lang/ClassLoader;"
#define use_java_lang_Class_getClassLoader(env, clazz)	\
	(methodID_java_lang_Class_getClassLoader =	\
		JRI_GetMethodID(env, clazz,	\
			name_java_lang_Class_getClassLoader,	\
			sig_java_lang_Class_getClassLoader))
#define unuse_java_lang_Class_getClassLoader(env, clazz)	\
	(methodID_java_lang_Class_getClassLoader = JRIUninitialized)

/*** public native isInterface ()Z ***/
extern JRIMethodID FAR methodID_java_lang_Class_isInterface;
#define name_java_lang_Class_isInterface	"isInterface"
#define sig_java_lang_Class_isInterface 	"()Z"
#define use_java_lang_Class_isInterface(env, clazz)	\
	(methodID_java_lang_Class_isInterface =	\
		JRI_GetMethodID(env, clazz,	\
			name_java_lang_Class_isInterface,	\
			sig_java_lang_Class_isInterface))
#define unuse_java_lang_Class_isInterface(env, clazz)	\
	(methodID_java_lang_Class_isInterface = JRIUninitialized)

/*** public toString ()Ljava/lang/String; ***/
extern JRIMethodID FAR methodID_java_lang_Class_toString;
#define name_java_lang_Class_toString	"toString"
#define sig_java_lang_Class_toString 	"()Ljava/lang/String;"
#define use_java_lang_Class_toString(env, clazz)	\
	(methodID_java_lang_Class_toString =	\
		JRI_GetMethodID(env, clazz,	\
			name_java_lang_Class_toString,	\
			sig_java_lang_Class_toString))
#define unuse_java_lang_Class_toString(env, clazz)	\
	(methodID_java_lang_Class_toString = JRIUninitialized)

/*******************************************************************************
 * IMPLEMENTATION SECTION: 
 * Define the IMPLEMENT_java_lang_Class symbol 
 * if you intend to implement the native methods of this class. This 
 * symbol makes the private and protected methods available. You should 
 * also call the register_java_lang_Class routine 
 * to make your native methods available.
 ******************************************************************************/

extern JRI_PUBLIC_API(struct java_lang_Class*)
use_java_lang_Class(JRIEnv* env);

extern JRI_PUBLIC_API(void)
unuse_java_lang_Class(JRIEnv* env);

extern JRI_PUBLIC_API(struct java_lang_Class*)
register_java_lang_Class(JRIEnv* env);

extern JRI_PUBLIC_API(void)
unregister_java_lang_Class(JRIEnv* env);

#ifdef IMPLEMENT_java_lang_Class

/*******************************************************************************
 * Native Methods: 
 * These are the signatures of the native methods which you must implement.
 ******************************************************************************/

/*** public static native forName (Ljava/lang/String;)Ljava/lang/Class; ***/
extern JRI_PUBLIC_API(struct java_lang_Class *)
native_java_lang_Class_forName(JRIEnv* env, struct java_lang_Class* clazz, struct java_lang_String *a);

/*** public native newInstance ()Ljava/lang/Object; ***/
extern JRI_PUBLIC_API(struct java_lang_Object *)
native_java_lang_Class_newInstance(JRIEnv* env, struct java_lang_Class* self);

/*** public native getName ()Ljava/lang/String; ***/
extern JRI_PUBLIC_API(struct java_lang_String *)
native_java_lang_Class_getName(JRIEnv* env, struct java_lang_Class* self);

/*** public native getSuperclass ()Ljava/lang/Class; ***/
extern JRI_PUBLIC_API(struct java_lang_Class *)
native_java_lang_Class_getSuperclass(JRIEnv* env, struct java_lang_Class* self);

/*** public native getInterfaces ()[Ljava/lang/Class; ***/
extern JRI_PUBLIC_API(jref)
native_java_lang_Class_getInterfaces(JRIEnv* env, struct java_lang_Class* self);

/*** public native getClassLoader ()Ljava/lang/ClassLoader; ***/
extern JRI_PUBLIC_API(struct java_lang_ClassLoader *)
native_java_lang_Class_getClassLoader(JRIEnv* env, struct java_lang_Class* self);

/*** public native isInterface ()Z ***/
extern JRI_PUBLIC_API(jbool)
native_java_lang_Class_isInterface(JRIEnv* env, struct java_lang_Class* self);

/*******************************************************************************
 * Implementation Methods: 
 * You should only use these from within the native method definitions.
 ******************************************************************************/

#ifdef DEBUG

/*** private <init> ()V ***/
extern JRI_PUBLIC_API(struct java_lang_Class*)
java_lang_Class_new(JRIEnv* env, struct java_lang_Class* clazz);

#else /* !DEBUG */

/*** private <init> ()V ***/
#define java_lang_Class_new(env, clazz)	\
	((struct java_lang_Class*)JRI_NewObject(env)(env, JRI_NewObject_op, clazz, methodID_java_lang_Class_new))

#endif /* !DEBUG*/

/*** private <init> ()V ***/
extern JRIMethodID FAR methodID_java_lang_Class_new;
#define name_java_lang_Class_new	"<init>"
#define sig_java_lang_Class_new 	"()V"
#define use_java_lang_Class_new(env, clazz)	\
	(methodID_java_lang_Class_new =	\
		JRI_GetMethodID(env, clazz,	\
			name_java_lang_Class_new,	\
			sig_java_lang_Class_new))
#define unuse_java_lang_Class_new(env, clazz)	\
	(methodID_java_lang_Class_new = JRIUninitialized)

#endif /* IMPLEMENT_java_lang_Class */

#ifdef __cplusplus
} /* extern "C" */

/*******************************************************************************
 * C++ Definitions
 ******************************************************************************/

#include "java_lang_Object.h"

struct java_lang_Class : public java_lang_Object {

	static struct java_lang_Class* _use(JRIEnv* env) {
		return use_java_lang_Class(env);
	}

	static void _unuse(JRIEnv* env) {
		unuse_java_lang_Class(env);
	}

	static struct java_lang_Class* _register(JRIEnv* env) {
		return register_java_lang_Class(env);
	}

	static void _unregister(JRIEnv* env) {
		unregister_java_lang_Class(env);
	}

	static struct java_lang_Class* _class(JRIEnv* env) {
		return class_java_lang_Class(env);
	}

	/* Public Methods */
	/*** public static native forName (Ljava/lang/String;)Ljava/lang/Class; ***/
	static struct java_lang_Class * forName(JRIEnv* env, struct java_lang_Class* clazz, struct java_lang_String *a) {
		return java_lang_Class_forName(env, clazz, a);
	}

	/*** public native newInstance ()Ljava/lang/Object; ***/
	struct java_lang_Object * newInstance(JRIEnv* env) {
		return java_lang_Class_newInstance(env, this);
	}

	/*** public native getName ()Ljava/lang/String; ***/
	struct java_lang_String * getName(JRIEnv* env) {
		return java_lang_Class_getName(env, this);
	}

	/*** public native getSuperclass ()Ljava/lang/Class; ***/
	struct java_lang_Class * getSuperclass(JRIEnv* env) {
		return java_lang_Class_getSuperclass(env, this);
	}

	/*** public native getInterfaces ()[Ljava/lang/Class; ***/
	jref getInterfaces(JRIEnv* env) {
		return java_lang_Class_getInterfaces(env, this);
	}

	/*** public native getClassLoader ()Ljava/lang/ClassLoader; ***/
	struct java_lang_ClassLoader * getClassLoader(JRIEnv* env) {
		return java_lang_Class_getClassLoader(env, this);
	}

	/*** public native isInterface ()Z ***/
	jbool isInterface(JRIEnv* env) {
		return java_lang_Class_isInterface(env, this);
	}

	/*** public toString ()Ljava/lang/String; ***/
	struct java_lang_String * toString(JRIEnv* env) {
		return java_lang_Class_toString(env, this);
	}

#ifdef IMPLEMENT_java_lang_Class

	/* Private Methods */
	/*** private <init> ()V ***/
	static java_lang_Class* _new(JRIEnv* env, struct java_lang_Class* clazz) {
		return java_lang_Class_new(env, clazz);
	}

#endif /* IMPLEMENT_java_lang_Class */
};

#endif /* __cplusplus */

#endif /* Class java/lang/Class */
