jni.h

00001 /*
00002  * @(#)jni.h    1.53 01/12/03
00003  *
00004  * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
00005  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
00006  */
00007 
00008 /*
00009  * We used part of Netscape's Java Runtime Interface (JRI) as the starting
00010  * point of our design and implementation.
00011  */
00012 
00013 /******************************************************************************
00014  * Java Runtime Interface
00015  * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
00016  *****************************************************************************/
00017 
00018 #ifndef _JAVASOFT_JNI_H_
00019 #define _JAVASOFT_JNI_H_
00020 
00021 #include <stdio.h>
00022 #include <stdarg.h>
00023 
00024 /* jni_md.h contains the machine-dependent typedefs for jbyte, jint
00025    and jlong */
00026 
00027 #include "jni_md.h"
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 /*
00034  * JNI Types
00035  */
00036 
00037 #ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
00038 
00039 typedef unsigned char   jboolean;
00040 typedef unsigned short  jchar;
00041 typedef short           jshort;
00042 typedef float           jfloat;
00043 typedef double          jdouble;
00044 
00045 typedef jint            jsize;
00046 
00047 #ifdef __cplusplus
00048 
00049 class _jobject {};
00050 class _jclass : public _jobject {};
00051 class _jthrowable : public _jobject {};
00052 class _jstring : public _jobject {};
00053 class _jarray : public _jobject {};
00054 class _jbooleanArray : public _jarray {};
00055 class _jbyteArray : public _jarray {};
00056 class _jcharArray : public _jarray {};
00057 class _jshortArray : public _jarray {};
00058 class _jintArray : public _jarray {};
00059 class _jlongArray : public _jarray {};
00060 class _jfloatArray : public _jarray {};
00061 class _jdoubleArray : public _jarray {};
00062 class _jobjectArray : public _jarray {};
00063 
00064 typedef _jobject *jobject;
00065 typedef _jclass *jclass;
00066 typedef _jthrowable *jthrowable;
00067 typedef _jstring *jstring;
00068 typedef _jarray *jarray;
00069 typedef _jbooleanArray *jbooleanArray;
00070 typedef _jbyteArray *jbyteArray;
00071 typedef _jcharArray *jcharArray;
00072 typedef _jshortArray *jshortArray;
00073 typedef _jintArray *jintArray;
00074 typedef _jlongArray *jlongArray;
00075 typedef _jfloatArray *jfloatArray;
00076 typedef _jdoubleArray *jdoubleArray;
00077 typedef _jobjectArray *jobjectArray;
00078 
00079 #else
00080 
00081 struct _jobject;
00082 
00083 typedef struct _jobject *jobject;
00084 typedef jobject jclass;
00085 typedef jobject jthrowable;
00086 typedef jobject jstring;
00087 typedef jobject jarray;
00088 typedef jarray jbooleanArray;
00089 typedef jarray jbyteArray;
00090 typedef jarray jcharArray;
00091 typedef jarray jshortArray;
00092 typedef jarray jintArray;
00093 typedef jarray jlongArray;
00094 typedef jarray jfloatArray;
00095 typedef jarray jdoubleArray;
00096 typedef jarray jobjectArray;
00097 
00098 #endif
00099 
00100 typedef jobject jweak;
00101 
00102 typedef union jvalue {
00103     jboolean z;
00104     jbyte    b;
00105     jchar    c;
00106     jshort   s;
00107     jint     i;
00108     jlong    j;
00109     jfloat   f;
00110     jdouble  d;
00111     jobject  l;
00112 } jvalue;
00113 
00114 struct _jfieldID;
00115 typedef struct _jfieldID *jfieldID;
00116 
00117 struct _jmethodID;
00118 typedef struct _jmethodID *jmethodID;
00119 
00120 #endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */
00121 
00122 /*
00123  * jboolean constants
00124  */
00125 
00126 #define JNI_FALSE 0
00127 #define JNI_TRUE 1
00128 
00129 /*
00130  * possible return values for JNI functions.
00131  */
00132 
00133 #define JNI_OK           0                 /* success */
00134 #define JNI_ERR          (-1)              /* unknown error */
00135 #define JNI_EDETACHED    (-2)              /* thread detached from the VM */
00136 #define JNI_EVERSION     (-3)              /* JNI version error */
00137 #define JNI_ENOMEM       (-4)              /* not enough memory */
00138 #define JNI_EEXIST       (-5)              /* VM already created */
00139 #define JNI_EINVAL       (-6)              /* invalid arguments */
00140 
00141 /*
00142  * used in ReleaseScalarArrayElements
00143  */
00144 
00145 #define JNI_COMMIT 1
00146 #define JNI_ABORT 2
00147 
00148 /*
00149  * used in RegisterNatives to describe native method name, signature,
00150  * and function pointer.
00151  */
00152 
00153 typedef struct {
00154     char *name;
00155     char *signature;
00156     void *fnPtr;
00157 } JNINativeMethod;
00158 
00159 /*
00160  * JNI Native Method Interface.
00161  */
00162 
00163 struct JNINativeInterface_;
00164 
00165 struct JNIEnv_;
00166 
00167 #ifdef __cplusplus
00168 typedef JNIEnv_ JNIEnv;
00169 #else
00170 typedef const struct JNINativeInterface_ *JNIEnv;
00171 #endif
00172 
00173 /*
00174  * JNI Invocation Interface.
00175  */
00176 
00177 struct JNIInvokeInterface_;
00178 
00179 struct JavaVM_;
00180 
00181 #ifdef __cplusplus
00182 typedef JavaVM_ JavaVM;
00183 #else
00184 typedef const struct JNIInvokeInterface_ *JavaVM;
00185 #endif
00186 
00187 struct JNINativeInterface_ {
00188     void *reserved0;
00189     void *reserved1;
00190     void *reserved2;
00191 
00192     void *reserved3;
00193     jint (JNICALL *GetVersion)(JNIEnv *env);
00194 
00195     jclass (JNICALL *DefineClass)
00196       (JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
00197        jsize len);
00198     jclass (JNICALL *FindClass)
00199       (JNIEnv *env, const char *name);
00200 
00201     jmethodID (JNICALL *FromReflectedMethod)
00202       (JNIEnv *env, jobject method);
00203     jfieldID (JNICALL *FromReflectedField)
00204       (JNIEnv *env, jobject field);
00205 
00206     jobject (JNICALL *ToReflectedMethod)
00207       (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
00208 
00209     jclass (JNICALL *GetSuperclass)
00210       (JNIEnv *env, jclass sub);
00211     jboolean (JNICALL *IsAssignableFrom)
00212       (JNIEnv *env, jclass sub, jclass sup);
00213 
00214     jobject (JNICALL *ToReflectedField)
00215       (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
00216 
00217     jint (JNICALL *Throw)
00218       (JNIEnv *env, jthrowable obj);
00219     jint (JNICALL *ThrowNew)
00220       (JNIEnv *env, jclass clazz, const char *msg);
00221     jthrowable (JNICALL *ExceptionOccurred)
00222       (JNIEnv *env);
00223     void (JNICALL *ExceptionDescribe)
00224       (JNIEnv *env);
00225     void (JNICALL *ExceptionClear)
00226       (JNIEnv *env);
00227     void (JNICALL *FatalError)
00228       (JNIEnv *env, const char *msg);
00229 
00230     jint (JNICALL *PushLocalFrame)
00231       (JNIEnv *env, jint capacity);
00232     jobject (JNICALL *PopLocalFrame)
00233       (JNIEnv *env, jobject result);
00234 
00235     jobject (JNICALL *NewGlobalRef)
00236       (JNIEnv *env, jobject lobj);
00237     void (JNICALL *DeleteGlobalRef)
00238       (JNIEnv *env, jobject gref);
00239     void (JNICALL *DeleteLocalRef)
00240       (JNIEnv *env, jobject obj);
00241     jboolean (JNICALL *IsSameObject)
00242       (JNIEnv *env, jobject obj1, jobject obj2);
00243     jobject (JNICALL *NewLocalRef)
00244       (JNIEnv *env, jobject ref);
00245     jint (JNICALL *EnsureLocalCapacity)
00246       (JNIEnv *env, jint capacity);
00247 
00248     jobject (JNICALL *AllocObject)
00249       (JNIEnv *env, jclass clazz);
00250     jobject (JNICALL *NewObject)
00251       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
00252     jobject (JNICALL *NewObjectV)
00253       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
00254     jobject (JNICALL *NewObjectA)
00255       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
00256 
00257     jclass (JNICALL *GetObjectClass)
00258       (JNIEnv *env, jobject obj);
00259     jboolean (JNICALL *IsInstanceOf)
00260       (JNIEnv *env, jobject obj, jclass clazz);
00261 
00262     jmethodID (JNICALL *GetMethodID)
00263       (JNIEnv *env, jclass clazz, const char *name, const char *sig);
00264 
00265     jobject (JNICALL *CallObjectMethod)
00266       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
00267     jobject (JNICALL *CallObjectMethodV)
00268       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
00269     jobject (JNICALL *CallObjectMethodA)
00270       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
00271 
00272     jboolean (JNICALL *CallBooleanMethod)
00273       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
00274     jboolean (JNICALL *CallBooleanMethodV)
00275       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
00276     jboolean (JNICALL *CallBooleanMethodA)
00277       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
00278 
00279     jbyte (JNICALL *CallByteMethod)
00280       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
00281     jbyte (JNICALL *CallByteMethodV)
00282       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
00283     jbyte (JNICALL *CallByteMethodA)
00284       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
00285 
00286     jchar (JNICALL *CallCharMethod)
00287       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
00288     jchar (JNICALL *CallCharMethodV)
00289       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
00290     jchar (JNICALL *CallCharMethodA)
00291       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
00292 
00293     jshort (JNICALL *CallShortMethod)
00294       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
00295     jshort (JNICALL *CallShortMethodV)
00296       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
00297     jshort (JNICALL *CallShortMethodA)
00298       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
00299 
00300     jint (JNICALL *CallIntMethod)
00301       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
00302     jint (JNICALL *CallIntMethodV)
00303       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
00304     jint (JNICALL *CallIntMethodA)
00305       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
00306 
00307     jlong (JNICALL *CallLongMethod)
00308       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
00309     jlong (JNICALL *CallLongMethodV)
00310       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
00311     jlong (JNICALL *CallLongMethodA)
00312       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
00313 
00314     jfloat (JNICALL *CallFloatMethod)
00315       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
00316     jfloat (JNICALL *CallFloatMethodV)
00317       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
00318     jfloat (JNICALL *CallFloatMethodA)
00319       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
00320 
00321     jdouble (JNICALL *CallDoubleMethod)
00322       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
00323     jdouble (JNICALL *CallDoubleMethodV)
00324       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
00325     jdouble (JNICALL *CallDoubleMethodA)
00326       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
00327 
00328     void (JNICALL *CallVoidMethod)
00329       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
00330     void (JNICALL *CallVoidMethodV)
00331       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
00332     void (JNICALL *CallVoidMethodA)
00333       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
00334 
00335     jobject (JNICALL *CallNonvirtualObjectMethod)
00336       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
00337     jobject (JNICALL *CallNonvirtualObjectMethodV)
00338       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00339        va_list args);
00340     jobject (JNICALL *CallNonvirtualObjectMethodA)
00341       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00342        jvalue * args);
00343 
00344     jboolean (JNICALL *CallNonvirtualBooleanMethod)
00345       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
00346     jboolean (JNICALL *CallNonvirtualBooleanMethodV)
00347       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00348        va_list args);
00349     jboolean (JNICALL *CallNonvirtualBooleanMethodA)
00350       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00351        jvalue * args);
00352 
00353     jbyte (JNICALL *CallNonvirtualByteMethod)
00354       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
00355     jbyte (JNICALL *CallNonvirtualByteMethodV)
00356       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00357        va_list args);
00358     jbyte (JNICALL *CallNonvirtualByteMethodA)
00359       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00360        jvalue *args);
00361 
00362     jchar (JNICALL *CallNonvirtualCharMethod)
00363       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
00364     jchar (JNICALL *CallNonvirtualCharMethodV)
00365       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00366        va_list args);
00367     jchar (JNICALL *CallNonvirtualCharMethodA)
00368       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00369        jvalue *args);
00370 
00371     jshort (JNICALL *CallNonvirtualShortMethod)
00372       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
00373     jshort (JNICALL *CallNonvirtualShortMethodV)
00374       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00375        va_list args);
00376     jshort (JNICALL *CallNonvirtualShortMethodA)
00377       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00378        jvalue *args);
00379 
00380     jint (JNICALL *CallNonvirtualIntMethod)
00381       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
00382     jint (JNICALL *CallNonvirtualIntMethodV)
00383       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00384        va_list args);
00385     jint (JNICALL *CallNonvirtualIntMethodA)
00386       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00387        jvalue *args);
00388 
00389     jlong (JNICALL *CallNonvirtualLongMethod)
00390       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
00391     jlong (JNICALL *CallNonvirtualLongMethodV)
00392       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00393        va_list args);
00394     jlong (JNICALL *CallNonvirtualLongMethodA)
00395       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00396        jvalue *args);
00397 
00398     jfloat (JNICALL *CallNonvirtualFloatMethod)
00399       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
00400     jfloat (JNICALL *CallNonvirtualFloatMethodV)
00401       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00402        va_list args);
00403     jfloat (JNICALL *CallNonvirtualFloatMethodA)
00404       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00405        jvalue *args);
00406 
00407     jdouble (JNICALL *CallNonvirtualDoubleMethod)
00408       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
00409     jdouble (JNICALL *CallNonvirtualDoubleMethodV)
00410       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00411        va_list args);
00412     jdouble (JNICALL *CallNonvirtualDoubleMethodA)
00413       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00414        jvalue *args);
00415 
00416     void (JNICALL *CallNonvirtualVoidMethod)
00417       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
00418     void (JNICALL *CallNonvirtualVoidMethodV)
00419       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00420        va_list args);
00421     void (JNICALL *CallNonvirtualVoidMethodA)
00422       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
00423        jvalue * args);
00424 
00425     jfieldID (JNICALL *GetFieldID)
00426       (JNIEnv *env, jclass clazz, const char *name, const char *sig);
00427 
00428     jobject (JNICALL *GetObjectField)
00429       (JNIEnv *env, jobject obj, jfieldID fieldID);
00430     jboolean (JNICALL *GetBooleanField)
00431       (JNIEnv *env, jobject obj, jfieldID fieldID);
00432     jbyte (JNICALL *GetByteField)
00433       (JNIEnv *env, jobject obj, jfieldID fieldID);
00434     jchar (JNICALL *GetCharField)
00435       (JNIEnv *env, jobject obj, jfieldID fieldID);
00436     jshort (JNICALL *GetShortField)
00437       (JNIEnv *env, jobject obj, jfieldID fieldID);
00438     jint (JNICALL *GetIntField)
00439       (JNIEnv *env, jobject obj, jfieldID fieldID);
00440     jlong (JNICALL *GetLongField)
00441       (JNIEnv *env, jobject obj, jfieldID fieldID);
00442     jfloat (JNICALL *GetFloatField)
00443       (JNIEnv *env, jobject obj, jfieldID fieldID);
00444     jdouble (JNICALL *GetDoubleField)
00445       (JNIEnv *env, jobject obj, jfieldID fieldID);
00446 
00447     void (JNICALL *SetObjectField)
00448       (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
00449     void (JNICALL *SetBooleanField)
00450       (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
00451     void (JNICALL *SetByteField)
00452       (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
00453     void (JNICALL *SetCharField)
00454       (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
00455     void (JNICALL *SetShortField)
00456       (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
00457     void (JNICALL *SetIntField)
00458       (JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
00459     void (JNICALL *SetLongField)
00460       (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
00461     void (JNICALL *SetFloatField)
00462       (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
00463     void (JNICALL *SetDoubleField)
00464       (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
00465 
00466     jmethodID (JNICALL *GetStaticMethodID)
00467       (JNIEnv *env, jclass clazz, const char *name, const char *sig);
00468 
00469     jobject (JNICALL *CallStaticObjectMethod)
00470       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
00471     jobject (JNICALL *CallStaticObjectMethodV)
00472       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
00473     jobject (JNICALL *CallStaticObjectMethodA)
00474       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
00475 
00476     jboolean (JNICALL *CallStaticBooleanMethod)
00477       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
00478     jboolean (JNICALL *CallStaticBooleanMethodV)
00479       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
00480     jboolean (JNICALL *CallStaticBooleanMethodA)
00481       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
00482 
00483     jbyte (JNICALL *CallStaticByteMethod)
00484       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
00485     jbyte (JNICALL *CallStaticByteMethodV)
00486       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
00487     jbyte (JNICALL *CallStaticByteMethodA)
00488       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
00489 
00490     jchar (JNICALL *CallStaticCharMethod)
00491       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
00492     jchar (JNICALL *CallStaticCharMethodV)
00493       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
00494     jchar (JNICALL *CallStaticCharMethodA)
00495       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
00496 
00497     jshort (JNICALL *CallStaticShortMethod)
00498       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
00499     jshort (JNICALL *CallStaticShortMethodV)
00500       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
00501     jshort (JNICALL *CallStaticShortMethodA)
00502       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
00503 
00504     jint (JNICALL *CallStaticIntMethod)
00505       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
00506     jint (JNICALL *CallStaticIntMethodV)
00507       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
00508     jint (JNICALL *CallStaticIntMethodA)
00509       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
00510 
00511     jlong (JNICALL *CallStaticLongMethod)
00512       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
00513     jlong (JNICALL *CallStaticLongMethodV)
00514       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
00515     jlong (JNICALL *CallStaticLongMethodA)
00516       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
00517 
00518     jfloat (JNICALL *CallStaticFloatMethod)
00519       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
00520     jfloat (JNICALL *CallStaticFloatMethodV)
00521       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
00522     jfloat (JNICALL *CallStaticFloatMethodA)
00523       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
00524 
00525     jdouble (JNICALL *CallStaticDoubleMethod)
00526       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
00527     jdouble (JNICALL *CallStaticDoubleMethodV)
00528       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
00529     jdouble (JNICALL *CallStaticDoubleMethodA)
00530       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
00531 
00532     void (JNICALL *CallStaticVoidMethod)
00533       (JNIEnv *env, jclass cls, jmethodID methodID, ...);
00534     void (JNICALL *CallStaticVoidMethodV)
00535       (JNIEnv *env, jclass cls, jmethodID methodID, va_list args);
00536     void (JNICALL *CallStaticVoidMethodA)
00537       (JNIEnv *env, jclass cls, jmethodID methodID, jvalue * args);
00538 
00539     jfieldID (JNICALL *GetStaticFieldID)
00540       (JNIEnv *env, jclass clazz, const char *name, const char *sig);
00541     jobject (JNICALL *GetStaticObjectField)
00542       (JNIEnv *env, jclass clazz, jfieldID fieldID);
00543     jboolean (JNICALL *GetStaticBooleanField)
00544       (JNIEnv *env, jclass clazz, jfieldID fieldID);
00545     jbyte (JNICALL *GetStaticByteField)
00546       (JNIEnv *env, jclass clazz, jfieldID fieldID);
00547     jchar (JNICALL *GetStaticCharField)
00548       (JNIEnv *env, jclass clazz, jfieldID fieldID);
00549     jshort (JNICALL *GetStaticShortField)
00550       (JNIEnv *env, jclass clazz, jfieldID fieldID);
00551     jint (JNICALL *GetStaticIntField)
00552       (JNIEnv *env, jclass clazz, jfieldID fieldID);
00553     jlong (JNICALL *GetStaticLongField)
00554       (JNIEnv *env, jclass clazz, jfieldID fieldID);
00555     jfloat (JNICALL *GetStaticFloatField)
00556       (JNIEnv *env, jclass clazz, jfieldID fieldID);
00557     jdouble (JNICALL *GetStaticDoubleField)
00558       (JNIEnv *env, jclass clazz, jfieldID fieldID);
00559 
00560     void (JNICALL *SetStaticObjectField)
00561       (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
00562     void (JNICALL *SetStaticBooleanField)
00563       (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
00564     void (JNICALL *SetStaticByteField)
00565       (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
00566     void (JNICALL *SetStaticCharField)
00567       (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
00568     void (JNICALL *SetStaticShortField)
00569       (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
00570     void (JNICALL *SetStaticIntField)
00571       (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
00572     void (JNICALL *SetStaticLongField)
00573       (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
00574     void (JNICALL *SetStaticFloatField)
00575       (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
00576     void (JNICALL *SetStaticDoubleField)
00577       (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
00578 
00579     jstring (JNICALL *NewString)
00580       (JNIEnv *env, const jchar *unicode, jsize len);
00581     jsize (JNICALL *GetStringLength)
00582       (JNIEnv *env, jstring str);
00583     const jchar *(JNICALL *GetStringChars)
00584       (JNIEnv *env, jstring str, jboolean *isCopy);
00585     void (JNICALL *ReleaseStringChars)
00586       (JNIEnv *env, jstring str, const jchar *chars);
00587 
00588     jstring (JNICALL *NewStringUTF)
00589       (JNIEnv *env, const char *utf);
00590     jsize (JNICALL *GetStringUTFLength)
00591       (JNIEnv *env, jstring str);
00592     const char* (JNICALL *GetStringUTFChars)
00593       (JNIEnv *env, jstring str, jboolean *isCopy);
00594     void (JNICALL *ReleaseStringUTFChars)
00595       (JNIEnv *env, jstring str, const char* chars);
00596 
00597 
00598     jsize (JNICALL *GetArrayLength)
00599       (JNIEnv *env, jarray array);
00600 
00601     jobjectArray (JNICALL *NewObjectArray)
00602       (JNIEnv *env, jsize len, jclass clazz, jobject init);
00603     jobject (JNICALL *GetObjectArrayElement)
00604       (JNIEnv *env, jobjectArray array, jsize index);
00605     void (JNICALL *SetObjectArrayElement)
00606       (JNIEnv *env, jobjectArray array, jsize index, jobject val);
00607 
00608     jbooleanArray (JNICALL *NewBooleanArray)
00609       (JNIEnv *env, jsize len);
00610     jbyteArray (JNICALL *NewByteArray)
00611       (JNIEnv *env, jsize len);
00612     jcharArray (JNICALL *NewCharArray)
00613       (JNIEnv *env, jsize len);
00614     jshortArray (JNICALL *NewShortArray)
00615       (JNIEnv *env, jsize len);
00616     jintArray (JNICALL *NewIntArray)
00617       (JNIEnv *env, jsize len);
00618     jlongArray (JNICALL *NewLongArray)
00619       (JNIEnv *env, jsize len);
00620     jfloatArray (JNICALL *NewFloatArray)
00621       (JNIEnv *env, jsize len);
00622     jdoubleArray (JNICALL *NewDoubleArray)
00623       (JNIEnv *env, jsize len);
00624 
00625     jboolean * (JNICALL *GetBooleanArrayElements)
00626       (JNIEnv *env, jbooleanArray array, jboolean *isCopy);
00627     jbyte * (JNICALL *GetByteArrayElements)
00628       (JNIEnv *env, jbyteArray array, jboolean *isCopy);
00629     jchar * (JNICALL *GetCharArrayElements)
00630       (JNIEnv *env, jcharArray array, jboolean *isCopy);
00631     jshort * (JNICALL *GetShortArrayElements)
00632       (JNIEnv *env, jshortArray array, jboolean *isCopy);
00633     jint * (JNICALL *GetIntArrayElements)
00634       (JNIEnv *env, jintArray array, jboolean *isCopy);
00635     jlong * (JNICALL *GetLongArrayElements)
00636       (JNIEnv *env, jlongArray array, jboolean *isCopy);
00637     jfloat * (JNICALL *GetFloatArrayElements)
00638       (JNIEnv *env, jfloatArray array, jboolean *isCopy);
00639     jdouble * (JNICALL *GetDoubleArrayElements)
00640       (JNIEnv *env, jdoubleArray array, jboolean *isCopy);
00641 
00642     void (JNICALL *ReleaseBooleanArrayElements)
00643       (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
00644     void (JNICALL *ReleaseByteArrayElements)
00645       (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
00646     void (JNICALL *ReleaseCharArrayElements)
00647       (JNIEnv *env, jcharArray array, jchar *elems, jint mode);
00648     void (JNICALL *ReleaseShortArrayElements)
00649       (JNIEnv *env, jshortArray array, jshort *elems, jint mode);
00650     void (JNICALL *ReleaseIntArrayElements)
00651       (JNIEnv *env, jintArray array, jint *elems, jint mode);
00652     void (JNICALL *ReleaseLongArrayElements)
00653       (JNIEnv *env, jlongArray array, jlong *elems, jint mode);
00654     void (JNICALL *ReleaseFloatArrayElements)
00655       (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
00656     void (JNICALL *ReleaseDoubleArrayElements)
00657       (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
00658 
00659     void (JNICALL *GetBooleanArrayRegion)
00660       (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
00661     void (JNICALL *GetByteArrayRegion)
00662       (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
00663     void (JNICALL *GetCharArrayRegion)
00664       (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
00665     void (JNICALL *GetShortArrayRegion)
00666       (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
00667     void (JNICALL *GetIntArrayRegion)
00668       (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
00669     void (JNICALL *GetLongArrayRegion)
00670       (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
00671     void (JNICALL *GetFloatArrayRegion)
00672       (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
00673     void (JNICALL *GetDoubleArrayRegion)
00674       (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
00675 
00676     void (JNICALL *SetBooleanArrayRegion)
00677       (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
00678     void (JNICALL *SetByteArrayRegion)
00679       (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
00680     void (JNICALL *SetCharArrayRegion)
00681       (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
00682     void (JNICALL *SetShortArrayRegion)
00683       (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
00684     void (JNICALL *SetIntArrayRegion)
00685       (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
00686     void (JNICALL *SetLongArrayRegion)
00687       (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
00688     void (JNICALL *SetFloatArrayRegion)
00689       (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
00690     void (JNICALL *SetDoubleArrayRegion)
00691       (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
00692 
00693     jint (JNICALL *RegisterNatives)
00694       (JNIEnv *env, jclass clazz, const JNINativeMethod *methods,
00695        jint nMethods);
00696     jint (JNICALL *UnregisterNatives)
00697       (JNIEnv *env, jclass clazz);
00698 
00699     jint (JNICALL *MonitorEnter)
00700       (JNIEnv *env, jobject obj);
00701     jint (JNICALL *MonitorExit)
00702       (JNIEnv *env, jobject obj);
00703 
00704     jint (JNICALL *GetJavaVM)
00705       (JNIEnv *env, JavaVM **vm);
00706 
00707     void (JNICALL *GetStringRegion)
00708       (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
00709     void (JNICALL *GetStringUTFRegion)
00710       (JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
00711 
00712     void * (JNICALL *GetPrimitiveArrayCritical)
00713       (JNIEnv *env, jarray array, jboolean *isCopy);
00714     void (JNICALL *ReleasePrimitiveArrayCritical)
00715       (JNIEnv *env, jarray array, void *carray, jint mode);
00716 
00717     const jchar * (JNICALL *GetStringCritical)
00718       (JNIEnv *env, jstring string, jboolean *isCopy);
00719     void (JNICALL *ReleaseStringCritical)
00720       (JNIEnv *env, jstring string, const jchar *cstring);
00721 
00722     jweak (JNICALL *NewWeakGlobalRef)
00723        (JNIEnv *env, jobject obj);
00724     void (JNICALL *DeleteWeakGlobalRef)
00725        (JNIEnv *env, jweak ref);
00726 
00727     jboolean (JNICALL *ExceptionCheck)
00728        (JNIEnv *env);
00729 
00730     jobject (JNICALL *NewDirectByteBuffer)
00731        (JNIEnv* env, void* address, jlong capacity);
00732     void* (JNICALL *GetDirectBufferAddress)
00733        (JNIEnv* env, jobject buf);
00734     jlong (JNICALL *GetDirectBufferCapacity)
00735        (JNIEnv* env, jobject buf);
00736 };
00737 
00738 /*
00739  * We use inlined functions for C++ so that programmers can write:
00740  *
00741  *    env->FindClass("java/lang/String")
00742  *
00743  * in C++ rather than:
00744  *
00745  *    (*env)->FindClass(env, "java/lang/String")
00746  *
00747  * in C.
00748  */
00749 
00750 struct JNIEnv_ {
00751     const struct JNINativeInterface_ *functions;
00752 #ifdef __cplusplus
00753 
00754     jint GetVersion() {
00755         return functions->GetVersion(this);
00756     }
00757     jclass DefineClass(const char *name, jobject loader, const jbyte *buf,
00758                        jsize len) {
00759         return functions->DefineClass(this, name, loader, buf, len);
00760     }
00761     jclass FindClass(const char *name) {
00762         return functions->FindClass(this, name);
00763     }
00764     jmethodID FromReflectedMethod(jobject method) {
00765         return functions->FromReflectedMethod(this,method);
00766     }
00767     jfieldID FromReflectedField(jobject field) {
00768         return functions->FromReflectedField(this,field);
00769     }
00770 
00771     jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) {
00772         return functions->ToReflectedMethod(this, cls, methodID, isStatic);
00773     }
00774 
00775     jclass GetSuperclass(jclass sub) {
00776         return functions->GetSuperclass(this, sub);
00777     }
00778     jboolean IsAssignableFrom(jclass sub, jclass sup) {
00779         return functions->IsAssignableFrom(this, sub, sup);
00780     }
00781 
00782     jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) {
00783         return functions->ToReflectedField(this,cls,fieldID,isStatic);
00784     }
00785 
00786     jint Throw(jthrowable obj) {
00787         return functions->Throw(this, obj);
00788     }
00789     jint ThrowNew(jclass clazz, const char *msg) {
00790         return functions->ThrowNew(this, clazz, msg);
00791     }
00792     jthrowable ExceptionOccurred() {
00793         return functions->ExceptionOccurred(this);
00794     }
00795     void ExceptionDescribe() {
00796         functions->ExceptionDescribe(this);
00797     }
00798     void ExceptionClear() {
00799         functions->ExceptionClear(this);
00800     }
00801     void FatalError(const char *msg) {
00802         functions->FatalError(this, msg);
00803     }
00804 
00805     jint PushLocalFrame(jint capacity) {
00806         return functions->PushLocalFrame(this,capacity);
00807     }
00808     jobject PopLocalFrame(jobject result) {
00809         return functions->PopLocalFrame(this,result);
00810     }
00811 
00812     jobject NewGlobalRef(jobject lobj) {
00813         return functions->NewGlobalRef(this,lobj);
00814     }
00815     void DeleteGlobalRef(jobject gref) {
00816         functions->DeleteGlobalRef(this,gref);
00817     }
00818     void DeleteLocalRef(jobject obj) {
00819         functions->DeleteLocalRef(this, obj);
00820     }
00821 
00822     jboolean IsSameObject(jobject obj1, jobject obj2) {
00823         return functions->IsSameObject(this,obj1,obj2);
00824     }
00825 
00826     jobject NewLocalRef(jobject ref) {
00827         return functions->NewLocalRef(this,ref);
00828     }
00829     jint EnsureLocalCapacity(jint capacity) {
00830         return functions->EnsureLocalCapacity(this,capacity);
00831     }
00832 
00833     jobject AllocObject(jclass clazz) {
00834         return functions->AllocObject(this,clazz);
00835     }
00836     jobject NewObject(jclass clazz, jmethodID methodID, ...) {
00837         va_list args;
00838         jobject result;
00839         va_start(args, methodID);
00840         result = functions->NewObjectV(this,clazz,methodID,args);
00841         va_end(args);
00842         return result;
00843     }
00844     jobject NewObjectV(jclass clazz, jmethodID methodID,
00845                        va_list args) {
00846         return functions->NewObjectV(this,clazz,methodID,args);
00847     }
00848     jobject NewObjectA(jclass clazz, jmethodID methodID,
00849                        jvalue *args) {
00850         return functions->NewObjectA(this,clazz,methodID,args);
00851     }
00852 
00853     jclass GetObjectClass(jobject obj) {
00854         return functions->GetObjectClass(this,obj);
00855     }
00856     jboolean IsInstanceOf(jobject obj, jclass clazz) {
00857         return functions->IsInstanceOf(this,obj,clazz);
00858     }
00859 
00860     jmethodID GetMethodID(jclass clazz, const char *name,
00861                           const char *sig) {
00862         return functions->GetMethodID(this,clazz,name,sig);
00863     }
00864 
00865     jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) {
00866         va_list args;
00867         jobject result;
00868         va_start(args,methodID);
00869         result = functions->CallObjectMethodV(this,obj,methodID,args);
00870         va_end(args);
00871         return result;
00872     }
00873     jobject CallObjectMethodV(jobject obj, jmethodID methodID,
00874                         va_list args) {
00875         return functions->CallObjectMethodV(this,obj,methodID,args);
00876     }
00877     jobject CallObjectMethodA(jobject obj, jmethodID methodID,
00878                         jvalue * args) {
00879         return functions->CallObjectMethodA(this,obj,methodID,args);
00880     }
00881 
00882     jboolean CallBooleanMethod(jobject obj,
00883                                jmethodID methodID, ...) {
00884         va_list args;
00885         jboolean result;
00886         va_start(args,methodID);
00887         result = functions->CallBooleanMethodV(this,obj,methodID,args);
00888         va_end(args);
00889         return result;
00890     }
00891     jboolean CallBooleanMethodV(jobject obj, jmethodID methodID,
00892                                 va_list args) {
00893         return functions->CallBooleanMethodV(this,obj,methodID,args);
00894     }
00895     jboolean CallBooleanMethodA(jobject obj, jmethodID methodID,
00896                                 jvalue * args) {
00897         return functions->CallBooleanMethodA(this,obj,methodID, args);
00898     }
00899 
00900     jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) {
00901         va_list args;
00902         jbyte result;
00903         va_start(args,methodID);
00904         result = functions->CallByteMethodV(this,obj,methodID,args);
00905         va_end(args);
00906         return result;
00907     }
00908     jbyte CallByteMethodV(jobject obj, jmethodID methodID,
00909                           va_list args) {
00910         return functions->CallByteMethodV(this,obj,methodID,args);
00911     }
00912     jbyte CallByteMethodA(jobject obj, jmethodID methodID,
00913                           jvalue * args) {
00914         return functions->CallByteMethodA(this,obj,methodID,args);
00915     }
00916 
00917     jchar CallCharMethod(jobject obj, jmethodID methodID, ...) {
00918         va_list args;
00919         jchar result;
00920         va_start(args,methodID);
00921         result = functions->CallCharMethodV(this,obj,methodID,args);
00922         va_end(args);
00923         return result;
00924     }
00925     jchar CallCharMethodV(jobject obj, jmethodID methodID,
00926                           va_list args) {
00927         return functions->CallCharMethodV(this,obj,methodID,args);
00928     }
00929     jchar CallCharMethodA(jobject obj, jmethodID methodID,
00930                           jvalue * args) {
00931         return functions->CallCharMethodA(this,obj,methodID,args);
00932     }
00933 
00934     jshort CallShortMethod(jobject obj, jmethodID methodID, ...) {
00935         va_list args;
00936         jshort result;
00937         va_start(args,methodID);
00938         result = functions->CallShortMethodV(this,obj,methodID,args);
00939         va_end(args);
00940         return result;
00941     }
00942     jshort CallShortMethodV(jobject obj, jmethodID methodID,
00943                             va_list args) {
00944         return functions->CallShortMethodV(this,obj,methodID,args);
00945     }
00946     jshort CallShortMethodA(jobject obj, jmethodID methodID,
00947                             jvalue * args) {
00948         return functions->CallShortMethodA(this,obj,methodID,args);
00949     }
00950 
00951     jint CallIntMethod(jobject obj, jmethodID methodID, ...) {
00952         va_list args;
00953         jint result;
00954         va_start(args,methodID);
00955         result = functions->CallIntMethodV(this,obj,methodID,args);
00956         va_end(args);
00957         return result;
00958     }
00959     jint CallIntMethodV(jobject obj, jmethodID methodID,
00960                         va_list args) {
00961         return functions->CallIntMethodV(this,obj,methodID,args);
00962     }
00963     jint CallIntMethodA(jobject obj, jmethodID methodID,
00964                         jvalue * args) {
00965         return functions->CallIntMethodA(this,obj,methodID,args);
00966     }
00967 
00968     jlong CallLongMethod(jobject obj, jmethodID methodID, ...) {
00969         va_list args;
00970         jlong result;
00971         va_start(args,methodID);
00972         result = functions->CallLongMethodV(this,obj,methodID,args);
00973         va_end(args);
00974         return result;
00975     }
00976     jlong CallLongMethodV(jobject obj, jmethodID methodID,
00977                           va_list args) {
00978         return functions->CallLongMethodV(this,obj,methodID,args);
00979     }
00980     jlong CallLongMethodA(jobject obj, jmethodID methodID,
00981                           jvalue * args) {
00982         return functions->CallLongMethodA(this,obj,methodID,args);
00983     }
00984 
00985     jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) {
00986         va_list args;
00987         jfloat result;
00988         va_start(args,methodID);
00989         result = functions->CallFloatMethodV(this,obj,methodID,args);
00990         va_end(args);
00991         return result;
00992     }
00993     jfloat CallFloatMethodV(jobject obj, jmethodID methodID,
00994                             va_list args) {
00995         return functions->CallFloatMethodV(this,obj,methodID,args);
00996     }
00997     jfloat CallFloatMethodA(jobject obj, jmethodID methodID,
00998                             jvalue * args) {
00999         return functions->CallFloatMethodA(this,obj,methodID,args);
01000     }
01001 
01002     jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) {
01003         va_list args;
01004         jdouble result;
01005         va_start(args,methodID);
01006         result = functions->CallDoubleMethodV(this,obj,methodID,args);
01007         va_end(args);
01008         return result;
01009     }
01010     jdouble CallDoubleMethodV(jobject obj, jmethodID methodID,
01011                         va_list args) {
01012         return functions->CallDoubleMethodV(this,obj,methodID,args);
01013     }
01014     jdouble CallDoubleMethodA(jobject obj, jmethodID methodID,
01015                         jvalue * args) {
01016         return functions->CallDoubleMethodA(this,obj,methodID,args);
01017     }
01018 
01019     void CallVoidMethod(jobject obj, jmethodID methodID, ...) {
01020         va_list args;
01021         va_start(args,methodID);
01022         functions->CallVoidMethodV(this,obj,methodID,args);
01023         va_end(args);
01024     }
01025     void CallVoidMethodV(jobject obj, jmethodID methodID,
01026                          va_list args) {
01027         functions->CallVoidMethodV(this,obj,methodID,args);
01028     }
01029     void CallVoidMethodA(jobject obj, jmethodID methodID,
01030                          jvalue * args) {
01031         functions->CallVoidMethodA(this,obj,methodID,args);
01032     }
01033 
01034     jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz,
01035                                        jmethodID methodID, ...) {
01036         va_list args;
01037         jobject result;
01038         va_start(args,methodID);
01039         result = functions->CallNonvirtualObjectMethodV(this,obj,clazz,
01040                                                         methodID,args);
01041         va_end(args);
01042         return result;
01043     }
01044     jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz,
01045                                         jmethodID methodID, va_list args) {
01046         return functions->CallNonvirtualObjectMethodV(this,obj,clazz,
01047                                                       methodID,args);
01048     }
01049     jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz,
01050                                         jmethodID methodID, jvalue * args) {
01051         return functions->CallNonvirtualObjectMethodA(this,obj,clazz,
01052                                                       methodID,args);
01053     }
01054 
01055     jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz,
01056                                          jmethodID methodID, ...) {
01057         va_list args;
01058         jboolean result;
01059         va_start(args,methodID);
01060         result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
01061                                                          methodID,args);
01062         va_end(args);
01063         return result;
01064     }
01065     jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz,
01066                                           jmethodID methodID, va_list args) {
01067         return functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
01068                                                        methodID,args);
01069     }
01070     jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz,
01071                                           jmethodID methodID, jvalue * args) {
01072         return functions->CallNonvirtualBooleanMethodA(this,obj,clazz,
01073                                                        methodID, args);
01074     }
01075 
01076     jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz,
01077                                    jmethodID methodID, ...) {
01078         va_list args;
01079         jbyte result;
01080         va_start(args,methodID);
01081         result = functions->CallNonvirtualByteMethodV(this,obj,clazz,
01082                                                       methodID,args);
01083         va_end(args);
01084         return result;
01085     }
01086     jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz,
01087                                     jmethodID methodID, va_list args) {
01088         return functions->CallNonvirtualByteMethodV(this,obj,clazz,
01089                                                     methodID,args);
01090     }
01091     jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz,
01092                                     jmethodID methodID, jvalue * args) {
01093         return functions->CallNonvirtualByteMethodA(this,obj,clazz,
01094                                                     methodID,args);
01095     }
01096 
01097     jchar CallNonvirtualCharMethod(jobject obj, jclass clazz,
01098                                    jmethodID methodID, ...) {
01099         va_list args;
01100         jchar result;
01101         va_start(args,methodID);
01102         result = functions->CallNonvirtualCharMethodV(this,obj,clazz,
01103                                                       methodID,args);
01104         va_end(args);
01105         return result;
01106     }
01107     jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz,
01108                                     jmethodID methodID, va_list args) {
01109         return functions->CallNonvirtualCharMethodV(this,obj,clazz,
01110                                                     methodID,args);
01111     }
01112     jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz,
01113                                     jmethodID methodID, jvalue * args) {
01114         return functions->CallNonvirtualCharMethodA(this,obj,clazz,
01115                                                     methodID,args);
01116     }
01117 
01118     jshort CallNonvirtualShortMethod(jobject obj, jclass clazz,
01119                                      jmethodID methodID, ...) {
01120         va_list args;
01121         jshort result;
01122         va_start(args,methodID);
01123         result = functions->CallNonvirtualShortMethodV(this,obj,clazz,
01124                                                        methodID,args);
01125         va_end(args);
01126         return result;
01127     }
01128     jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz,
01129                                       jmethodID methodID, va_list args) {
01130         return functions->CallNonvirtualShortMethodV(this,obj,clazz,
01131                                                      methodID,args);
01132     }
01133     jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,
01134                                       jmethodID methodID, jvalue * args) {
01135         return functions->CallNonvirtualShortMethodA(this,obj,clazz,
01136                                                      methodID,args);
01137     }
01138 
01139     jint CallNonvirtualIntMethod(jobject obj, jclass clazz,
01140                                  jmethodID methodID, ...) {
01141         va_list args;
01142         jint result;
01143         va_start(args,methodID);
01144         result = functions->CallNonvirtualIntMethodV(this,obj,clazz,
01145                                                      methodID,args);
01146         va_end(args);
01147         return result;
01148     }
01149     jint CallNonvirtualIntMethodV(jobject obj, jclass clazz,
01150                                   jmethodID methodID, va_list args) {
01151         return functions->CallNonvirtualIntMethodV(this,obj,clazz,
01152                                                    methodID,args);
01153     }
01154     jint CallNonvirtualIntMethodA(jobject obj, jclass clazz,
01155                                   jmethodID methodID, jvalue * args) {
01156         return functions->CallNonvirtualIntMethodA(this,obj,clazz,
01157                                                    methodID,args);
01158     }
01159 
01160     jlong CallNonvirtualLongMethod(jobject obj, jclass clazz,
01161                                    jmethodID methodID, ...) {
01162         va_list args;
01163         jlong result;
01164         va_start(args,methodID);
01165         result = functions->CallNonvirtualLongMethodV(this,obj,clazz,
01166                                                       methodID,args);
01167         va_end(args);
01168         return result;
01169     }
01170     jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz,
01171                                     jmethodID methodID, va_list args) {
01172         return functions->CallNonvirtualLongMethodV(this,obj,clazz,
01173                                                     methodID,args);
01174     }
01175     jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz,
01176                                     jmethodID methodID, jvalue * args) {
01177         return functions->CallNonvirtualLongMethodA(this,obj,clazz,
01178                                                     methodID,args);
01179     }
01180 
01181     jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz,
01182                                      jmethodID methodID, ...) {
01183         va_list args;
01184         jfloat result;
01185         va_start(args,methodID);
01186         result = functions->CallNonvirtualFloatMethodV(this,obj,clazz,
01187                                                        methodID,args);
01188         va_end(args);
01189         return result;
01190     }
01191     jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz,
01192                                       jmethodID methodID,
01193                                       va_list args) {
01194         return functions->CallNonvirtualFloatMethodV(this,obj,clazz,
01195                                                      methodID,args);
01196     }
01197     jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz,
01198                                       jmethodID methodID,
01199                                       jvalue * args) {
01200         return functions->CallNonvirtualFloatMethodA(this,obj,clazz,
01201                                                      methodID,args);
01202     }
01203 
01204     jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz,
01205                                        jmethodID methodID, ...) {
01206         va_list args;
01207         jdouble result;
01208         va_start(args,methodID);
01209         result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
01210                                                         methodID,args);
01211         va_end(args);
01212         return result;
01213     }
01214     jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz,
01215                                         jmethodID methodID,
01216                                         va_list args) {
01217         return functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
01218                                                       methodID,args);
01219     }
01220     jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz,
01221                                         jmethodID methodID,
01222                                         jvalue * args) {
01223         return functions->CallNonvirtualDoubleMethodA(this,obj,clazz,
01224                                                       methodID,args);
01225     }
01226 
01227     void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
01228                                   jmethodID methodID, ...) {
01229         va_list args;
01230         va_start(args,methodID);
01231         functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
01232         va_end(args);
01233     }
01234     void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
01235                                    jmethodID methodID,
01236                                    va_list args) {
01237         functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
01238     }
01239     void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
01240                                    jmethodID methodID,
01241                                    jvalue * args) {
01242         functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args);
01243     }
01244 
01245     jfieldID GetFieldID(jclass clazz, const char *name,
01246                         const char *sig) {
01247         return functions->GetFieldID(this,clazz,name,sig);
01248     }
01249 
01250     jobject GetObjectField(jobject obj, jfieldID fieldID) {
01251         return functions->GetObjectField(this,obj,fieldID);
01252     }
01253     jboolean GetBooleanField(jobject obj, jfieldID fieldID) {
01254         return functions->GetBooleanField(this,obj,fieldID);
01255     }
01256     jbyte GetByteField(jobject obj, jfieldID fieldID) {
01257         return functions->GetByteField(this,obj,fieldID);
01258     }
01259     jchar GetCharField(jobject obj, jfieldID fieldID) {
01260         return functions->GetCharField(this,obj,fieldID);
01261     }
01262     jshort GetShortField(jobject obj, jfieldID fieldID) {
01263         return functions->GetShortField(this,obj,fieldID);
01264     }
01265     jint GetIntField(jobject obj, jfieldID fieldID) {
01266         return functions->GetIntField(this,obj,fieldID);
01267     }
01268     jlong GetLongField(jobject obj, jfieldID fieldID) {
01269         return functions->GetLongField(this,obj,fieldID);
01270     }
01271     jfloat GetFloatField(jobject obj, jfieldID fieldID) {
01272         return functions->GetFloatField(this,obj,fieldID);
01273     }
01274     jdouble GetDoubleField(jobject obj, jfieldID fieldID) {
01275         return functions->GetDoubleField(this,obj,fieldID);
01276     }
01277 
01278     void SetObjectField(jobject obj, jfieldID fieldID, jobject val) {
01279         functions->SetObjectField(this,obj,fieldID,val);
01280     }
01281     void SetBooleanField(jobject obj, jfieldID fieldID,
01282                          jboolean val) {
01283         functions->SetBooleanField(this,obj,fieldID,val);
01284     }
01285     void SetByteField(jobject obj, jfieldID fieldID,
01286                       jbyte val) {
01287         functions->SetByteField(this,obj,fieldID,val);
01288     }
01289     void SetCharField(jobject obj, jfieldID fieldID,
01290                       jchar val) {
01291         functions->SetCharField(this,obj,fieldID,val);
01292     }
01293     void SetShortField(jobject obj, jfieldID fieldID,
01294                        jshort val) {
01295         functions->SetShortField(this,obj,fieldID,val);
01296     }
01297     void SetIntField(jobject obj, jfieldID fieldID,
01298                      jint val) {
01299         functions->SetIntField(this,obj,fieldID,val);
01300     }
01301     void SetLongField(jobject obj, jfieldID fieldID,
01302                       jlong val) {
01303         functions->SetLongField(this,obj,fieldID,val);
01304     }
01305     void SetFloatField(jobject obj, jfieldID fieldID,
01306                        jfloat val) {
01307         functions->SetFloatField(this,obj,fieldID,val);
01308     }
01309     void SetDoubleField(jobject obj, jfieldID fieldID,
01310                         jdouble val) {
01311         functions->SetDoubleField(this,obj,fieldID,val);
01312     }
01313 
01314     jmethodID GetStaticMethodID(jclass clazz, const char *name,
01315                                 const char *sig) {
01316         return functions->GetStaticMethodID(this,clazz,name,sig);
01317     }
01318 
01319     jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID,
01320                              ...) {
01321         va_list args;
01322         jobject result;
01323         va_start(args,methodID);
01324         result = functions->CallStaticObjectMethodV(this,clazz,methodID,args);
01325         va_end(args);
01326         return result;
01327     }
01328     jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID,
01329                               va_list args) {
01330         return functions->CallStaticObjectMethodV(this,clazz,methodID,args);
01331     }
01332     jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID,
01333                               jvalue *args) {
01334         return functions->CallStaticObjectMethodA(this,clazz,methodID,args);
01335     }
01336 
01337     jboolean CallStaticBooleanMethod(jclass clazz,
01338                                      jmethodID methodID, ...) {
01339         va_list args;
01340         jboolean result;
01341         va_start(args,methodID);
01342         result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
01343         va_end(args);
01344         return result;
01345     }
01346     jboolean CallStaticBooleanMethodV(jclass clazz,
01347                                       jmethodID methodID, va_list args) {
01348         return functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
01349     }
01350     jboolean CallStaticBooleanMethodA(jclass clazz,
01351                                       jmethodID methodID, jvalue *args) {
01352         return functions->CallStaticBooleanMethodA(this,clazz,methodID,args);
01353     }
01354 
01355     jbyte CallStaticByteMethod(jclass clazz,
01356                                jmethodID methodID, ...) {
01357         va_list args;
01358         jbyte result;
01359         va_start(args,methodID);
01360         result = functions->CallStaticByteMethodV(this,clazz,methodID,args);
01361         va_end(args);
01362         return result;
01363     }
01364     jbyte CallStaticByteMethodV(jclass clazz,
01365                                 jmethodID methodID, va_list args) {
01366         return functions->CallStaticByteMethodV(this,clazz,methodID,args);
01367     }
01368     jbyte CallStaticByteMethodA(jclass clazz,
01369                                 jmethodID methodID, jvalue *args) {
01370         return functions->CallStaticByteMethodA(this,clazz,methodID,args);
01371     }
01372 
01373     jchar CallStaticCharMethod(jclass clazz,
01374                                jmethodID methodID, ...) {
01375         va_list args;
01376         jchar result;
01377         va_start(args,methodID);
01378         result = functions->CallStaticCharMethodV(this,clazz,methodID,args);
01379         va_end(args);
01380         return result;
01381     }
01382     jchar CallStaticCharMethodV(jclass clazz,
01383                                 jmethodID methodID, va_list args) {
01384         return functions->CallStaticCharMethodV(this,clazz,methodID,args);
01385     }
01386     jchar CallStaticCharMethodA(jclass clazz,
01387                                 jmethodID methodID, jvalue *args) {
01388         return functions->CallStaticCharMethodA(this,clazz,methodID,args);
01389     }
01390 
01391     jshort CallStaticShortMethod(jclass clazz,
01392                                  jmethodID methodID, ...) {
01393         va_list args;
01394         jshort result;
01395         va_start(args,methodID);
01396         result = functions->CallStaticShortMethodV(this,clazz,methodID,args);
01397         va_end(args);
01398         return result;
01399     }
01400     jshort CallStaticShortMethodV(jclass clazz,
01401                                   jmethodID methodID, va_list args) {
01402         return functions->CallStaticShortMethodV(this,clazz,methodID,args);
01403     }
01404     jshort CallStaticShortMethodA(jclass clazz,
01405                                   jmethodID methodID, jvalue *args) {
01406         return functions->CallStaticShortMethodA(this,clazz,methodID,args);
01407     }
01408 
01409     jint CallStaticIntMethod(jclass clazz,
01410                              jmethodID methodID, ...) {
01411         va_list args;
01412         jint result;
01413         va_start(args,methodID);
01414         result = functions->CallStaticIntMethodV(this,clazz,methodID,args);
01415         va_end(args);
01416         return result;
01417     }
01418     jint CallStaticIntMethodV(jclass clazz,
01419                               jmethodID methodID, va_list args) {
01420         return functions->CallStaticIntMethodV(this,clazz,methodID,args);
01421     }
01422     jint CallStaticIntMethodA(jclass clazz,
01423                               jmethodID methodID, jvalue *args) {
01424         return functions->CallStaticIntMethodA(this,clazz,methodID,args);
01425     }
01426 
01427     jlong CallStaticLongMethod(jclass clazz,
01428                                jmethodID methodID, ...) {
01429         va_list args;
01430         jlong result;
01431         va_start(args,methodID);
01432         result = functions->CallStaticLongMethodV(this,clazz,methodID,args);
01433         va_end(args);
01434         return result;
01435     }
01436     jlong CallStaticLongMethodV(jclass clazz,
01437                                 jmethodID methodID, va_list args) {
01438         return functions->CallStaticLongMethodV(this,clazz,methodID,args);
01439     }
01440     jlong CallStaticLongMethodA(jclass clazz,
01441                                 jmethodID methodID, jvalue *args) {
01442         return functions->CallStaticLongMethodA(this,clazz,methodID,args);
01443     }
01444 
01445     jfloat CallStaticFloatMethod(jclass clazz,
01446                                  jmethodID methodID, ...) {
01447         va_list args;
01448         jfloat result;
01449         va_start(args,methodID);
01450         result = functions->CallStaticFloatMethodV(this,clazz,methodID,args);
01451         va_end(args);
01452         return result;
01453     }
01454     jfloat CallStaticFloatMethodV(jclass clazz,
01455                                   jmethodID methodID, va_list args) {
01456         return functions->CallStaticFloatMethodV(this,clazz,methodID,args);
01457     }
01458     jfloat CallStaticFloatMethodA(jclass clazz,
01459                                   jmethodID methodID, jvalue *args) {
01460         return functions->CallStaticFloatMethodA(this,clazz,methodID,args);
01461     }
01462 
01463     jdouble CallStaticDoubleMethod(jclass clazz,
01464                                    jmethodID methodID, ...) {
01465         va_list args;
01466         jdouble result;
01467         va_start(args,methodID);
01468         result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
01469         va_end(args);
01470         return result;
01471     }
01472     jdouble CallStaticDoubleMethodV(jclass clazz,
01473                                     jmethodID methodID, va_list args) {
01474         return functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
01475     }
01476     jdouble CallStaticDoubleMethodA(jclass clazz,
01477                                     jmethodID methodID, jvalue *args) {
01478         return functions->CallStaticDoubleMethodA(this,clazz,methodID,args);
01479     }
01480 
01481     void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {
01482         va_list args;
01483         va_start(args,methodID);
01484         functions->CallStaticVoidMethodV(this,cls,methodID,args);
01485         va_end(args);
01486     }
01487     void CallStaticVoidMethodV(jclass cls, jmethodID methodID,
01488                                va_list args) {
01489         functions->CallStaticVoidMethodV(this,cls,methodID,args);
01490     }
01491     void CallStaticVoidMethodA(jclass cls, jmethodID methodID,
01492                                jvalue * args) {
01493         functions->CallStaticVoidMethodA(this,cls,methodID,args);
01494     }
01495 
01496     jfieldID GetStaticFieldID(jclass clazz, const char *name,
01497                               const char *sig) {
01498         return functions->GetStaticFieldID(this,clazz,name,sig);
01499     }
01500     jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) {
01501         return functions->GetStaticObjectField(this,clazz,fieldID);
01502     }
01503     jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) {
01504         return functions->GetStaticBooleanField(this,clazz,fieldID);
01505     }
01506     jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) {
01507         return functions->GetStaticByteField(this,clazz,fieldID);
01508     }
01509     jchar GetStaticCharField(jclass clazz, jfieldID fieldID) {
01510         return functions->GetStaticCharField(this,clazz,fieldID);
01511     }
01512     jshort GetStaticShortField(jclass clazz, jfieldID fieldID) {
01513         return functions->GetStaticShortField(this,clazz,fieldID);
01514     }
01515     jint GetStaticIntField(jclass clazz, jfieldID fieldID) {
01516         return functions->GetStaticIntField(this,clazz,fieldID);
01517     }
01518     jlong GetStaticLongField(jclass clazz, jfieldID fieldID) {
01519         return functions->GetStaticLongField(this,clazz,fieldID);
01520     }
01521     jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) {
01522         return functions->GetStaticFloatField(this,clazz,fieldID);
01523     }
01524     jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) {
01525         return functions->GetStaticDoubleField(this,clazz,fieldID);
01526     }
01527 
01528     void SetStaticObjectField(jclass clazz, jfieldID fieldID,
01529                         jobject value) {
01530       functions->SetStaticObjectField(this,clazz,fieldID,value);
01531     }
01532     void SetStaticBooleanField(jclass clazz, jfieldID fieldID,
01533                         jboolean value) {
01534       functions->SetStaticBooleanField(this,clazz,fieldID,value);
01535     }
01536     void SetStaticByteField(jclass clazz, jfieldID fieldID,
01537                         jbyte value) {
01538       functions->SetStaticByteField(this,clazz,fieldID,value);
01539     }
01540     void SetStaticCharField(jclass clazz, jfieldID fieldID,
01541                         jchar value) {
01542       functions->SetStaticCharField(this,clazz,fieldID,value);
01543     }
01544     void SetStaticShortField(jclass clazz, jfieldID fieldID,
01545                         jshort value) {
01546       functions->SetStaticShortField(this,clazz,fieldID,value);
01547     }
01548     void SetStaticIntField(jclass clazz, jfieldID fieldID,
01549                         jint value) {
01550       functions->SetStaticIntField(this,clazz,fieldID,value);
01551     }
01552     void SetStaticLongField(jclass clazz, jfieldID fieldID,
01553                         jlong value) {
01554       functions->SetStaticLongField(this,clazz,fieldID,value);
01555     }
01556     void SetStaticFloatField(jclass clazz, jfieldID fieldID,
01557                         jfloat value) {
01558       functions->SetStaticFloatField(this,clazz,fieldID,value);
01559     }
01560     void SetStaticDoubleField(jclass clazz, jfieldID fieldID,
01561                         jdouble value) {
01562       functions->SetStaticDoubleField(this,clazz,fieldID,value);
01563     }
01564 
01565     jstring NewString(const jchar *unicode, jsize len) {
01566         return functions->NewString(this,unicode,len);
01567     }
01568     jsize GetStringLength(jstring str) {
01569         return functions->GetStringLength(this,str);
01570     }
01571     const jchar *GetStringChars(jstring str, jboolean *isCopy) {
01572         return functions->GetStringChars(this,str,isCopy);
01573     }
01574     void ReleaseStringChars(jstring str, const jchar *chars) {
01575         functions->ReleaseStringChars(this,str,chars);
01576     }
01577 
01578     jstring NewStringUTF(const char *utf) {
01579         return functions->NewStringUTF(this,utf);
01580     }
01581     jsize GetStringUTFLength(jstring str) {
01582         return functions->GetStringUTFLength(this,str);
01583     }
01584     const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
01585         return functions->GetStringUTFChars(this,str,isCopy);
01586     }
01587     void ReleaseStringUTFChars(jstring str, const char* chars) {
01588         functions->ReleaseStringUTFChars(this,str,chars);
01589     }
01590 
01591     jsize GetArrayLength(jarray array) {
01592         return functions->GetArrayLength(this,array);
01593     }
01594 
01595     jobjectArray NewObjectArray(jsize len, jclass clazz,
01596                                 jobject init) {
01597         return functions->NewObjectArray(this,len,clazz,init);
01598     }
01599     jobject GetObjectArrayElement(jobjectArray array, jsize index) {
01600         return functions->GetObjectArrayElement(this,array,index);
01601     }
01602     void SetObjectArrayElement(jobjectArray array, jsize index,
01603                                jobject val) {
01604         functions->SetObjectArrayElement(this,array,index,val);
01605     }
01606 
01607     jbooleanArray NewBooleanArray(jsize len) {
01608         return functions->NewBooleanArray(this,len);
01609     }
01610     jbyteArray NewByteArray(jsize len) {
01611         return functions->NewByteArray(this,len);
01612     }
01613     jcharArray NewCharArray(jsize len) {
01614         return functions->NewCharArray(this,len);
01615     }
01616     jshortArray NewShortArray(jsize len) {
01617         return functions->NewShortArray(this,len);
01618     }
01619     jintArray NewIntArray(jsize len) {
01620         return functions->NewIntArray(this,len);
01621     }
01622     jlongArray NewLongArray(jsize len) {
01623         return functions->NewLongArray(this,len);
01624     }
01625     jfloatArray NewFloatArray(jsize len) {
01626         return functions->NewFloatArray(this,len);
01627     }
01628     jdoubleArray NewDoubleArray(jsize len) {
01629         return functions->NewDoubleArray(this,len);
01630     }
01631 
01632     jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) {
01633         return functions->GetBooleanArrayElements(this,array,isCopy);
01634     }
01635     jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) {
01636         return functions->GetByteArrayElements(this,array,isCopy);
01637     }
01638     jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) {
01639         return functions->GetCharArrayElements(this,array,isCopy);
01640     }
01641     jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) {
01642         return functions->GetShortArrayElements(this,array,isCopy);
01643     }
01644     jint * GetIntArrayElements(jintArray array, jboolean *isCopy) {
01645         return functions->GetIntArrayElements(this,array,isCopy);
01646     }
01647     jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) {
01648         return functions->GetLongArrayElements(this,array,isCopy);
01649     }
01650     jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) {
01651         return functions->GetFloatArrayElements(this,array,isCopy);
01652     }
01653     jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) {
01654         return functions->GetDoubleArrayElements(this,array,isCopy);
01655     }
01656 
01657     void ReleaseBooleanArrayElements(jbooleanArray array,
01658                                      jboolean *elems,
01659                                      jint mode) {
01660         functions->ReleaseBooleanArrayElements(this,array,elems,mode);
01661     }
01662     void ReleaseByteArrayElements(jbyteArray array,
01663                                   jbyte *elems,
01664                                   jint mode) {
01665         functions->ReleaseByteArrayElements(this,array,elems,mode);
01666     }
01667     void ReleaseCharArrayElements(jcharArray array,
01668                                   jchar *elems,
01669                                   jint mode) {
01670         functions->ReleaseCharArrayElements(this,array,elems,mode);
01671     }
01672     void ReleaseShortArrayElements(jshortArray array,
01673                                    jshort *elems,
01674                                    jint mode) {
01675         functions->ReleaseShortArrayElements(this,array,elems,mode);
01676     }
01677     void ReleaseIntArrayElements(jintArray array,
01678                                  jint *elems,
01679                                  jint mode) {
01680         functions->ReleaseIntArrayElements(this,array,elems,mode);
01681     }
01682     void ReleaseLongArrayElements(jlongArray array,
01683                                   jlong *elems,
01684                                   jint mode) {
01685         functions->ReleaseLongArrayElements(this,array,elems,mode);
01686     }
01687     void ReleaseFloatArrayElements(jfloatArray array,
01688                                    jfloat *elems,
01689                                    jint mode) {
01690         functions->ReleaseFloatArrayElements(this,array,elems,mode);
01691     }
01692     void ReleaseDoubleArrayElements(jdoubleArray array,
01693                                     jdouble *elems,
01694                                     jint mode) {
01695         functions->ReleaseDoubleArrayElements(this,array,elems,mode);
01696     }
01697 
01698     void GetBooleanArrayRegion(jbooleanArray array,
01699                                jsize start, jsize len, jboolean *buf) {
01700         functions->GetBooleanArrayRegion(this,array,start,len,buf);
01701     }
01702     void GetByteArrayRegion(jbyteArray array,
01703                             jsize start, jsize len, jbyte *buf) {
01704         functions->GetByteArrayRegion(this,array,start,len,buf);
01705     }
01706     void GetCharArrayRegion(jcharArray array,
01707                             jsize start, jsize len, jchar *buf) {
01708         functions->GetCharArrayRegion(this,array,start,len,buf);
01709     }
01710     void GetShortArrayRegion(jshortArray array,
01711                              jsize start, jsize len, jshort *buf) {
01712         functions->GetShortArrayRegion(this,array,start,len,buf);
01713     }
01714     void GetIntArrayRegion(jintArray array,
01715                            jsize start, jsize len, jint *buf) {
01716         functions->GetIntArrayRegion(this,array,start,len,buf);
01717     }
01718     void GetLongArrayRegion(jlongArray array,
01719                             jsize start, jsize len, jlong *buf) {
01720         functions->GetLongArrayRegion(this,array,start,len,buf);
01721     }
01722     void GetFloatArrayRegion(jfloatArray array,
01723                              jsize start, jsize len, jfloat *buf) {
01724         functions->GetFloatArrayRegion(this,array,start,len,buf);
01725     }
01726     void GetDoubleArrayRegion(jdoubleArray array,
01727                               jsize start, jsize len, jdouble *buf) {
01728         functions->GetDoubleArrayRegion(this,array,start,len,buf);
01729     }
01730 
01731     void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
01732                                jboolean *buf) {
01733         functions->SetBooleanArrayRegion(this,array,start,len,buf);
01734     }
01735     void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
01736                             jbyte *buf) {
01737         functions->SetByteArrayRegion(this,array,start,len,buf);
01738     }
01739     void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
01740                             jchar *buf) {
01741         functions->SetCharArrayRegion(this,array,start,len,buf);
01742     }
01743     void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
01744                              jshort *buf) {
01745         functions->SetShortArrayRegion(this,array,start,len,buf);
01746     }
01747     void SetIntArrayRegion(jintArray array, jsize start, jsize len,
01748                            jint *buf) {
01749         functions->SetIntArrayRegion(this,array,start,len,buf);
01750     }
01751     void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
01752                             jlong *buf) {
01753         functions->SetLongArrayRegion(this,array,start,len,buf);
01754     }
01755     void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
01756                              jfloat *buf) {
01757         functions->SetFloatArrayRegion(this,array,start,len,buf);
01758     }
01759     void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
01760                               jdouble *buf) {
01761         functions->SetDoubleArrayRegion(this,array,start,len,buf);
01762     }
01763 
01764     jint RegisterNatives(jclass clazz, const JNINativeMethod *methods,
01765                          jint nMethods) {
01766         return functions->RegisterNatives(this,clazz,methods,nMethods);
01767     }
01768     jint UnregisterNatives(jclass clazz) {
01769         return functions->UnregisterNatives(this,clazz);
01770     }
01771 
01772     jint MonitorEnter(jobject obj) {
01773         return functions->MonitorEnter(this,obj);
01774     }
01775     jint MonitorExit(jobject obj) {
01776         return functions->MonitorExit(this,obj);
01777     }
01778 
01779     jint GetJavaVM(JavaVM **vm) {
01780         return functions->GetJavaVM(this,vm);
01781     }
01782 
01783     void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) {
01784         functions->GetStringRegion(this,str,start,len,buf);
01785     }
01786     void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) {
01787         functions->GetStringUTFRegion(this,str,start,len,buf);
01788     }
01789 
01790     void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) {
01791         return functions->GetPrimitiveArrayCritical(this,array,isCopy);
01792     }
01793     void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) {
01794         functions->ReleasePrimitiveArrayCritical(this,array,carray,mode);
01795     }
01796 
01797     const jchar * GetStringCritical(jstring string, jboolean *isCopy) {
01798         return functions->GetStringCritical(this,string,isCopy);
01799     }
01800     void ReleaseStringCritical(jstring string, const jchar *cstring) {
01801         functions->ReleaseStringCritical(this,string,cstring);
01802     }
01803 
01804     jweak NewWeakGlobalRef(jobject obj) {
01805         return functions->NewWeakGlobalRef(this,obj);
01806     }
01807     void DeleteWeakGlobalRef(jweak ref) {
01808         functions->DeleteWeakGlobalRef(this,ref);
01809     }
01810 
01811     jboolean ExceptionCheck() {
01812         return functions->ExceptionCheck(this);
01813     }
01814 
01815     jobject NewDirectByteBuffer(void* address, jlong capacity) {
01816         return functions->NewDirectByteBuffer(this, address, capacity);
01817     }
01818     void* GetDirectBufferAddress(jobject buf) {
01819         return functions->GetDirectBufferAddress(this, buf);
01820     }
01821     jlong GetDirectBufferCapacity(jobject buf) {
01822         return functions->GetDirectBufferCapacity(this, buf);
01823     }
01824 
01825 #endif /* __cplusplus */
01826 };
01827 
01828 typedef struct JavaVMOption {
01829     char *optionString;
01830     void *extraInfo;
01831 } JavaVMOption;
01832 
01833 typedef struct JavaVMInitArgs {
01834     jint version;
01835 
01836     jint nOptions;
01837     JavaVMOption *options;
01838     jboolean ignoreUnrecognized;
01839 } JavaVMInitArgs;
01840 
01841 typedef struct JavaVMAttachArgs {
01842     jint version;
01843 
01844     char *name;
01845     jobject group;
01846 } JavaVMAttachArgs;
01847 
01848 /* These structures will be VM-specific. */
01849 
01850 typedef struct JDK1_1InitArgs {
01851     jint version;
01852 
01853     char **properties;
01854     jint checkSource;
01855     jint nativeStackSize;
01856     jint javaStackSize;
01857     jint minHeapSize;
01858     jint maxHeapSize;
01859     jint verifyMode;
01860     char *classpath;
01861 
01862     jint (JNICALL *vfprintf)(FILE *fp, const char *format, va_list args);
01863     void (JNICALL *exit)(jint code);
01864     void (JNICALL *abort)(void);
01865 
01866     jint enableClassGC;
01867     jint enableVerboseGC;
01868     jint disableAsyncGC;
01869     jint verbose;
01870     jboolean debugging;
01871     jint debugPort;
01872 } JDK1_1InitArgs;
01873 
01874 typedef struct JDK1_1AttachArgs {
01875     void * __padding; /* C compilers don't allow empty structures. */
01876 } JDK1_1AttachArgs;
01877 
01878 #define JDK1_2
01879 #define JDK1_4
01880 
01881 /* End VM-specific. */
01882 
01883 struct JNIInvokeInterface_ {
01884     void *reserved0;
01885     void *reserved1;
01886     void *reserved2;
01887 
01888     jint (JNICALL *DestroyJavaVM)(JavaVM *vm);
01889 
01890     jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args);
01891 
01892     jint (JNICALL *DetachCurrentThread)(JavaVM *vm);
01893 
01894     jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version);
01895 
01896     jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args);
01897 };
01898 
01899 struct JavaVM_ {
01900     const struct JNIInvokeInterface_ *functions;
01901 #ifdef __cplusplus
01902 
01903     jint DestroyJavaVM() {
01904         return functions->DestroyJavaVM(this);
01905     }
01906     jint AttachCurrentThread(void **penv, void *args) {
01907         return functions->AttachCurrentThread(this, penv, args);
01908     }
01909     jint DetachCurrentThread() {
01910         return functions->DetachCurrentThread(this);
01911     }
01912 
01913     jint GetEnv(void **penv, jint version) {
01914         return functions->GetEnv(this, penv, version);
01915     }
01916     jint AttachCurrentThreadAsDaemon(void **penv, void *args) {
01917         return functions->AttachCurrentThreadAsDaemon(this, penv, args);
01918     }
01919 #endif
01920 };
01921 
01922 #ifdef _JNI_IMPLEMENTATION_
01923 #define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT
01924 #else
01925 #define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
01926 #endif
01927 _JNI_IMPORT_OR_EXPORT_ jint JNICALL
01928 JNI_GetDefaultJavaVMInitArgs(void *args);
01929 
01930 _JNI_IMPORT_OR_EXPORT_ jint JNICALL
01931 JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);
01932 
01933 _JNI_IMPORT_OR_EXPORT_ jint JNICALL
01934 JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
01935 
01936 /* Defined by native libraries. */
01937 JNIEXPORT jint JNICALL
01938 JNI_OnLoad(JavaVM *vm, void *reserved);
01939 
01940 JNIEXPORT void JNICALL
01941 JNI_OnUnload(JavaVM *vm, void *reserved);
01942 
01943 #define JNI_VERSION_1_1 0x00010001
01944 #define JNI_VERSION_1_2 0x00010002
01945 #define JNI_VERSION_1_4 0x00010004
01946 
01947 #ifdef __cplusplus
01948 } /* extern "C" */
01949 #endif /* __cplusplus */
01950 
01951 #endif /* !_JAVASOFT_JNI_H_ */

Generated on Mon Jun 5 10:20:43 2006 for Intelligence.kdevelop by  doxygen 1.4.6