Home | History | Annotate | Download | only in java
      1 /* ***** BEGIN LICENSE BLOCK *****
      2  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
      3  *
      4  * The contents of this file are subject to the Mozilla Public License Version
      5  * 1.1 (the "License"); you may not use this file except in compliance with
      6  * the License. You may obtain a copy of the License at
      7  * http://www.mozilla.org/MPL/
      8  *
      9  * Software distributed under the License is distributed on an "AS IS" basis,
     10  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     11  * for the specific language governing rights and limitations under the
     12  * License.
     13  *
     14  * The Original Code is the Java Runtime Interface.
     15  *
     16  * The Initial Developer of the Original Code is
     17  * Netscape Communications Corporation and Sun Microsystems, Inc.
     18  * Portions created by the Initial Developer are Copyright (C) 1993-1996
     19  * the Initial Developer. All Rights Reserved.
     20  *
     21  * Contributor(s):
     22  *
     23  * Alternatively, the contents of this file may be used under the terms of
     24  * either the GNU General Public License Version 2 or later (the "GPL"), or
     25  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
     26  * in which case the provisions of the GPL or the LGPL are applicable instead
     27  * of those above. If you wish to allow use of your version of this file only
     28  * under the terms of either the GPL or the LGPL, and not to allow others to
     29  * use your version of this file under the terms of the MPL, indicate your
     30  * decision by deleting the provisions above and replace them with the notice
     31  * and other provisions required by the GPL or the LGPL. If you do not delete
     32  * the provisions above, a recipient may use your version of this file under
     33  * the terms of any one of the MPL, the GPL or the LGPL.
     34  *
     35  * ***** END LICENSE BLOCK ***** */
     36 
     37 #ifndef JNI_H
     38 #define JNI_H
     39 
     40 #include <stdio.h>
     41 #include <stdarg.h>
     42 
     43 /* jni_md.h contains the machine-dependent typedefs for jbyte, jint
     44    and jlong */
     45 
     46 #include "jni_md.h"
     47 
     48 #ifdef __cplusplus
     49 extern "C" {
     50 #endif
     51 
     52 /*
     53  * JNI Types
     54  */
     55 
     56 typedef unsigned char	jboolean;
     57 typedef unsigned short	jchar;
     58 typedef short		jshort;
     59 typedef float		jfloat;
     60 typedef double		jdouble;
     61 
     62 typedef jint            jsize;
     63 
     64 #ifdef __cplusplus
     65 
     66 class _jobject {};
     67 class _jclass : public _jobject {};
     68 class _jthrowable : public _jobject {};
     69 class _jstring : public _jobject {};
     70 class _jarray : public _jobject {};
     71 class _jbooleanArray : public _jarray {};
     72 class _jbyteArray : public _jarray {};
     73 class _jcharArray : public _jarray {};
     74 class _jshortArray : public _jarray {};
     75 class _jintArray : public _jarray {};
     76 class _jlongArray : public _jarray {};
     77 class _jfloatArray : public _jarray {};
     78 class _jdoubleArray : public _jarray {};
     79 class _jobjectArray : public _jarray {};
     80 
     81 typedef _jobject *jobject;
     82 typedef _jclass *jclass;
     83 typedef _jthrowable *jthrowable;
     84 typedef _jstring *jstring;
     85 typedef _jarray *jarray;
     86 typedef _jbooleanArray *jbooleanArray;
     87 typedef _jbyteArray *jbyteArray;
     88 typedef _jcharArray *jcharArray;
     89 typedef _jshortArray *jshortArray;
     90 typedef _jintArray *jintArray;
     91 typedef _jlongArray *jlongArray;
     92 typedef _jfloatArray *jfloatArray;
     93 typedef _jdoubleArray *jdoubleArray;
     94 typedef _jobjectArray *jobjectArray;
     95 
     96 #else
     97 
     98 struct _jobject;
     99 
    100 typedef struct _jobject *jobject;
    101 typedef jobject jclass;
    102 typedef jobject jthrowable;
    103 typedef jobject jstring;
    104 typedef jobject jarray;
    105 typedef jarray jbooleanArray;
    106 typedef jarray jbyteArray;
    107 typedef jarray jcharArray;
    108 typedef jarray jshortArray;
    109 typedef jarray jintArray;
    110 typedef jarray jlongArray;
    111 typedef jarray jfloatArray;
    112 typedef jarray jdoubleArray;
    113 typedef jarray jobjectArray;
    114 
    115 #endif
    116 
    117 #if 0	/* moved to jri_md.h */
    118 typedef jobject jref; /* For transition---not meant to be part of public
    119 			 API anymore.*/
    120 #endif
    121 
    122 typedef union jvalue {
    123     jboolean z;
    124     jbyte    b;
    125     jchar    c;
    126     jshort   s;
    127     jint     i;
    128     jlong    j;
    129     jfloat   f;
    130     jdouble  d;
    131     jobject  l;
    132 } jvalue;
    133 
    134 struct _jfieldID;
    135 typedef struct _jfieldID *jfieldID;
    136 
    137 struct _jmethodID;
    138 typedef struct _jmethodID *jmethodID;
    139 
    140 /*
    141  * jboolean constants
    142  */
    143 
    144 #define JNI_FALSE 0
    145 #define JNI_TRUE 1
    146 
    147 /*
    148  * possible return values for JNI functions.
    149  */
    150 
    151 #define JNI_OK 0
    152 #define JNI_ERR (-1)
    153 
    154 /*
    155  * used in ReleaseScalarArrayElements
    156  */
    157 
    158 #define JNI_COMMIT 1
    159 #define JNI_ABORT 2
    160 
    161 /*
    162  * used in RegisterNatives to describe native method name, signature,
    163  * and function pointer.
    164  */
    165 
    166 typedef struct {
    167     char *name;
    168     char *signature;
    169     void *fnPtr;
    170 } JNINativeMethod;
    171 
    172 /*
    173  * JNI Native Method Interface.
    174  */
    175 
    176 struct JNINativeInterface_;
    177 
    178 struct JNIEnv_;
    179 
    180 #ifdef __cplusplus
    181 typedef JNIEnv_ JNIEnv;
    182 #else
    183 typedef const struct JNINativeInterface_ *JNIEnv;
    184 #endif
    185 
    186 /*
    187  * JNI Invocation Interface.
    188  */
    189 
    190 struct JNIInvokeInterface_;
    191 
    192 struct JavaVM_;
    193 
    194 #ifdef __cplusplus
    195 typedef JavaVM_ JavaVM;
    196 #else
    197 typedef const struct JNIInvokeInterface_ *JavaVM;
    198 #endif
    199 
    200 struct JNINativeInterface_ {
    201     void *reserved0;
    202     void *reserved1;
    203     void *reserved2;
    204 
    205     void *reserved3;
    206     jint (JNICALL *GetVersion)(JNIEnv *env);
    207 
    208     jclass (JNICALL *DefineClass)
    209       (JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
    210        jsize len);
    211     jclass (JNICALL *FindClass)
    212       (JNIEnv *env, const char *name);
    213 
    214     void *reserved4;
    215     void *reserved5;
    216     void *reserved6;
    217 
    218     jclass (JNICALL *GetSuperclass)
    219       (JNIEnv *env, jclass sub);
    220     jboolean (JNICALL *IsAssignableFrom)
    221       (JNIEnv *env, jclass sub, jclass sup);
    222     void *reserved7;
    223 
    224 
    225     jint (JNICALL *Throw)
    226       (JNIEnv *env, jthrowable obj);
    227     jint (JNICALL *ThrowNew)
    228       (JNIEnv *env, jclass clazz, const char *msg);
    229     jthrowable (JNICALL *ExceptionOccurred)
    230       (JNIEnv *env);
    231     void (JNICALL *ExceptionDescribe)
    232       (JNIEnv *env);
    233     void (JNICALL *ExceptionClear)
    234       (JNIEnv *env);
    235     void (JNICALL *FatalError)
    236       (JNIEnv *env, const char *msg);
    237     void *reserved8;
    238     void *reserved9;
    239 
    240     jobject (JNICALL *NewGlobalRef)
    241       (JNIEnv *env, jobject lobj);
    242     void (JNICALL *DeleteGlobalRef)
    243       (JNIEnv *env, jobject gref);
    244     void (JNICALL *DeleteLocalRef)
    245       (JNIEnv *env, jobject obj);
    246     jboolean (JNICALL *IsSameObject)
    247       (JNIEnv *env, jobject obj1, jobject obj2);
    248     void *reserved10;
    249     void *reserved11;
    250 
    251     jobject (JNICALL *AllocObject)
    252       (JNIEnv *env, jclass clazz);
    253     jobject (JNICALL *NewObject)
    254       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
    255     jobject (JNICALL *NewObjectV)
    256       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
    257     jobject (JNICALL *NewObjectA)
    258       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
    259 
    260     jclass (JNICALL *GetObjectClass)
    261       (JNIEnv *env, jobject obj);
    262     jboolean (JNICALL *IsInstanceOf)
    263       (JNIEnv *env, jobject obj, jclass clazz);
    264 
    265     jmethodID (JNICALL *GetMethodID)
    266       (JNIEnv *env, jclass clazz, const char *name, const char *sig);
    267 
    268     jobject (JNICALL *CallObjectMethod)
    269       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
    270     jobject (JNICALL *CallObjectMethodV)
    271       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
    272     jobject (JNICALL *CallObjectMethodA)
    273       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
    274 
    275     jboolean (JNICALL *CallBooleanMethod)
    276       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
    277     jboolean (JNICALL *CallBooleanMethodV)
    278       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
    279     jboolean (JNICALL *CallBooleanMethodA)
    280       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
    281 
    282     jbyte (JNICALL *CallByteMethod)
    283       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
    284     jbyte (JNICALL *CallByteMethodV)
    285       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
    286     jbyte (JNICALL *CallByteMethodA)
    287       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
    288 
    289     jchar (JNICALL *CallCharMethod)
    290       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
    291     jchar (JNICALL *CallCharMethodV)
    292       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
    293     jchar (JNICALL *CallCharMethodA)
    294       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
    295 
    296     jshort (JNICALL *CallShortMethod)
    297       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
    298     jshort (JNICALL *CallShortMethodV)
    299       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
    300     jshort (JNICALL *CallShortMethodA)
    301       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
    302 
    303     jint (JNICALL *CallIntMethod)
    304       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
    305     jint (JNICALL *CallIntMethodV)
    306       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
    307     jint (JNICALL *CallIntMethodA)
    308       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
    309 
    310     jlong (JNICALL *CallLongMethod)
    311       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
    312     jlong (JNICALL *CallLongMethodV)
    313       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
    314     jlong (JNICALL *CallLongMethodA)
    315       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
    316 
    317     jfloat (JNICALL *CallFloatMethod)
    318       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
    319     jfloat (JNICALL *CallFloatMethodV)
    320       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
    321     jfloat (JNICALL *CallFloatMethodA)
    322       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
    323 
    324     jdouble (JNICALL *CallDoubleMethod)
    325       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
    326     jdouble (JNICALL *CallDoubleMethodV)
    327       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
    328     jdouble (JNICALL *CallDoubleMethodA)
    329       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
    330 
    331     void (JNICALL *CallVoidMethod)
    332       (JNIEnv *env, jobject obj, jmethodID methodID, ...);
    333     void (JNICALL *CallVoidMethodV)
    334       (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
    335     void (JNICALL *CallVoidMethodA)
    336       (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
    337 
    338     jobject (JNICALL *CallNonvirtualObjectMethod)
    339       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
    340     jobject (JNICALL *CallNonvirtualObjectMethodV)
    341       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    342        va_list args);
    343     jobject (JNICALL *CallNonvirtualObjectMethodA)
    344       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    345        jvalue * args);
    346 
    347     jboolean (JNICALL *CallNonvirtualBooleanMethod)
    348       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
    349     jboolean (JNICALL *CallNonvirtualBooleanMethodV)
    350       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    351        va_list args);
    352     jboolean (JNICALL *CallNonvirtualBooleanMethodA)
    353       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    354        jvalue * args);
    355 
    356     jbyte (JNICALL *CallNonvirtualByteMethod)
    357       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
    358     jbyte (JNICALL *CallNonvirtualByteMethodV)
    359       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    360        va_list args);
    361     jbyte (JNICALL *CallNonvirtualByteMethodA)
    362       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    363        jvalue *args);
    364 
    365     jchar (JNICALL *CallNonvirtualCharMethod)
    366       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
    367     jchar (JNICALL *CallNonvirtualCharMethodV)
    368       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    369        va_list args);
    370     jchar (JNICALL *CallNonvirtualCharMethodA)
    371       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    372        jvalue *args);
    373 
    374     jshort (JNICALL *CallNonvirtualShortMethod)
    375       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
    376     jshort (JNICALL *CallNonvirtualShortMethodV)
    377       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    378        va_list args);
    379     jshort (JNICALL *CallNonvirtualShortMethodA)
    380       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    381        jvalue *args);
    382 
    383     jint (JNICALL *CallNonvirtualIntMethod)
    384       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
    385     jint (JNICALL *CallNonvirtualIntMethodV)
    386       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    387        va_list args);
    388     jint (JNICALL *CallNonvirtualIntMethodA)
    389       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    390        jvalue *args);
    391 
    392     jlong (JNICALL *CallNonvirtualLongMethod)
    393       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
    394     jlong (JNICALL *CallNonvirtualLongMethodV)
    395       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    396        va_list args);
    397     jlong (JNICALL *CallNonvirtualLongMethodA)
    398       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    399        jvalue *args);
    400 
    401     jfloat (JNICALL *CallNonvirtualFloatMethod)
    402       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
    403     jfloat (JNICALL *CallNonvirtualFloatMethodV)
    404       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    405        va_list args);
    406     jfloat (JNICALL *CallNonvirtualFloatMethodA)
    407       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    408        jvalue *args);
    409 
    410     jdouble (JNICALL *CallNonvirtualDoubleMethod)
    411       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
    412     jdouble (JNICALL *CallNonvirtualDoubleMethodV)
    413       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    414        va_list args);
    415     jdouble (JNICALL *CallNonvirtualDoubleMethodA)
    416       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    417        jvalue *args);
    418 
    419     void (JNICALL *CallNonvirtualVoidMethod)
    420       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
    421     void (JNICALL *CallNonvirtualVoidMethodV)
    422       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    423        va_list args);
    424     void (JNICALL *CallNonvirtualVoidMethodA)
    425       (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
    426        jvalue * args);
    427 
    428     jfieldID (JNICALL *GetFieldID)
    429       (JNIEnv *env, jclass clazz, const char *name, const char *sig);
    430 
    431     jobject (JNICALL *GetObjectField)
    432       (JNIEnv *env, jobject obj, jfieldID fieldID);
    433     jboolean (JNICALL *GetBooleanField)
    434       (JNIEnv *env, jobject obj, jfieldID fieldID);
    435     jbyte (JNICALL *GetByteField)
    436       (JNIEnv *env, jobject obj, jfieldID fieldID);
    437     jchar (JNICALL *GetCharField)
    438       (JNIEnv *env, jobject obj, jfieldID fieldID);
    439     jshort (JNICALL *GetShortField)
    440       (JNIEnv *env, jobject obj, jfieldID fieldID);
    441     jint (JNICALL *GetIntField)
    442       (JNIEnv *env, jobject obj, jfieldID fieldID);
    443     jlong (JNICALL *GetLongField)
    444       (JNIEnv *env, jobject obj, jfieldID fieldID);
    445     jfloat (JNICALL *GetFloatField)
    446       (JNIEnv *env, jobject obj, jfieldID fieldID);
    447     jdouble (JNICALL *GetDoubleField)
    448       (JNIEnv *env, jobject obj, jfieldID fieldID);
    449 
    450     void (JNICALL *SetObjectField)
    451       (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
    452     void (JNICALL *SetBooleanField)
    453       (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
    454     void (JNICALL *SetByteField)
    455       (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
    456     void (JNICALL *SetCharField)
    457       (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
    458     void (JNICALL *SetShortField)
    459       (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
    460     void (JNICALL *SetIntField)
    461       (JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
    462     void (JNICALL *SetLongField)
    463       (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
    464     void (JNICALL *SetFloatField)
    465       (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
    466     void (JNICALL *SetDoubleField)
    467       (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
    468 
    469     jmethodID (JNICALL *GetStaticMethodID)
    470       (JNIEnv *env, jclass clazz, const char *name, const char *sig);
    471 
    472     jobject (JNICALL *CallStaticObjectMethod)
    473       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
    474     jobject (JNICALL *CallStaticObjectMethodV)
    475       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
    476     jobject (JNICALL *CallStaticObjectMethodA)
    477       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
    478 
    479     jboolean (JNICALL *CallStaticBooleanMethod)
    480       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
    481     jboolean (JNICALL *CallStaticBooleanMethodV)
    482       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
    483     jboolean (JNICALL *CallStaticBooleanMethodA)
    484       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
    485 
    486     jbyte (JNICALL *CallStaticByteMethod)
    487       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
    488     jbyte (JNICALL *CallStaticByteMethodV)
    489       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
    490     jbyte (JNICALL *CallStaticByteMethodA)
    491       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
    492 
    493     jchar (JNICALL *CallStaticCharMethod)
    494       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
    495     jchar (JNICALL *CallStaticCharMethodV)
    496       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
    497     jchar (JNICALL *CallStaticCharMethodA)
    498       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
    499 
    500     jshort (JNICALL *CallStaticShortMethod)
    501       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
    502     jshort (JNICALL *CallStaticShortMethodV)
    503       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
    504     jshort (JNICALL *CallStaticShortMethodA)
    505       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
    506 
    507     jint (JNICALL *CallStaticIntMethod)
    508       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
    509     jint (JNICALL *CallStaticIntMethodV)
    510       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
    511     jint (JNICALL *CallStaticIntMethodA)
    512       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
    513 
    514     jlong (JNICALL *CallStaticLongMethod)
    515       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
    516     jlong (JNICALL *CallStaticLongMethodV)
    517       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
    518     jlong (JNICALL *CallStaticLongMethodA)
    519       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
    520 
    521     jfloat (JNICALL *CallStaticFloatMethod)
    522       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
    523     jfloat (JNICALL *CallStaticFloatMethodV)
    524       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
    525     jfloat (JNICALL *CallStaticFloatMethodA)
    526       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
    527 
    528     jdouble (JNICALL *CallStaticDoubleMethod)
    529       (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
    530     jdouble (JNICALL *CallStaticDoubleMethodV)
    531       (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
    532     jdouble (JNICALL *CallStaticDoubleMethodA)
    533       (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
    534 
    535     void (JNICALL *CallStaticVoidMethod)
    536       (JNIEnv *env, jclass cls, jmethodID methodID, ...);
    537     void (JNICALL *CallStaticVoidMethodV)
    538       (JNIEnv *env, jclass cls, jmethodID methodID, va_list args);
    539     void (JNICALL *CallStaticVoidMethodA)
    540       (JNIEnv *env, jclass cls, jmethodID methodID, jvalue * args);
    541 
    542     jfieldID (JNICALL *GetStaticFieldID)
    543       (JNIEnv *env, jclass clazz, const char *name, const char *sig);
    544     jobject (JNICALL *GetStaticObjectField)
    545       (JNIEnv *env, jclass clazz, jfieldID fieldID);
    546     jboolean (JNICALL *GetStaticBooleanField)
    547       (JNIEnv *env, jclass clazz, jfieldID fieldID);
    548     jbyte (JNICALL *GetStaticByteField)
    549       (JNIEnv *env, jclass clazz, jfieldID fieldID);
    550     jchar (JNICALL *GetStaticCharField)
    551       (JNIEnv *env, jclass clazz, jfieldID fieldID);
    552     jshort (JNICALL *GetStaticShortField)
    553       (JNIEnv *env, jclass clazz, jfieldID fieldID);
    554     jint (JNICALL *GetStaticIntField)
    555       (JNIEnv *env, jclass clazz, jfieldID fieldID);
    556     jlong (JNICALL *GetStaticLongField)
    557       (JNIEnv *env, jclass clazz, jfieldID fieldID);
    558     jfloat (JNICALL *GetStaticFloatField)
    559       (JNIEnv *env, jclass clazz, jfieldID fieldID);
    560     jdouble (JNICALL *GetStaticDoubleField)
    561       (JNIEnv *env, jclass clazz, jfieldID fieldID);
    562 
    563     void (JNICALL *SetStaticObjectField)
    564       (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
    565     void (JNICALL *SetStaticBooleanField)
    566       (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
    567     void (JNICALL *SetStaticByteField)
    568       (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
    569     void (JNICALL *SetStaticCharField)
    570       (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
    571     void (JNICALL *SetStaticShortField)
    572       (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
    573     void (JNICALL *SetStaticIntField)
    574       (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
    575     void (JNICALL *SetStaticLongField)
    576       (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
    577     void (JNICALL *SetStaticFloatField)
    578       (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
    579     void (JNICALL *SetStaticDoubleField)
    580       (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
    581 
    582     jstring (JNICALL *NewString)
    583       (JNIEnv *env, const jchar *unicode, jsize len);
    584     jsize (JNICALL *GetStringLength)
    585       (JNIEnv *env, jstring str);
    586     const jchar *(JNICALL *GetStringChars)
    587       (JNIEnv *env, jstring str, jboolean *isCopy);
    588     void (JNICALL *ReleaseStringChars)
    589       (JNIEnv *env, jstring str, const jchar *chars);
    590 
    591     jstring (JNICALL *NewStringUTF)
    592       (JNIEnv *env, const char *utf);
    593     jsize (JNICALL *GetStringUTFLength)
    594       (JNIEnv *env, jstring str);
    595     const char* (JNICALL *GetStringUTFChars)
    596       (JNIEnv *env, jstring str, jboolean *isCopy);
    597     void (JNICALL *ReleaseStringUTFChars)
    598       (JNIEnv *env, jstring str, const char* chars);
    599 
    600 
    601     jsize (JNICALL *GetArrayLength)
    602       (JNIEnv *env, jarray array);
    603 
    604     jobjectArray (JNICALL *NewObjectArray)
    605       (JNIEnv *env, jsize len, jclass clazz, jobject init);
    606     jobject (JNICALL *GetObjectArrayElement)
    607       (JNIEnv *env, jobjectArray array, jsize index);
    608     void (JNICALL *SetObjectArrayElement)
    609       (JNIEnv *env, jobjectArray array, jsize index, jobject val);
    610 
    611     jbooleanArray (JNICALL *NewBooleanArray)
    612       (JNIEnv *env, jsize len);
    613     jbyteArray (JNICALL *NewByteArray)
    614       (JNIEnv *env, jsize len);
    615     jcharArray (JNICALL *NewCharArray)
    616       (JNIEnv *env, jsize len);
    617     jshortArray (JNICALL *NewShortArray)
    618       (JNIEnv *env, jsize len);
    619     jintArray (JNICALL *NewIntArray)
    620       (JNIEnv *env, jsize len);
    621     jlongArray (JNICALL *NewLongArray)
    622       (JNIEnv *env, jsize len);
    623     jfloatArray (JNICALL *NewFloatArray)
    624       (JNIEnv *env, jsize len);
    625     jdoubleArray (JNICALL *NewDoubleArray)
    626       (JNIEnv *env, jsize len);
    627 
    628     jboolean * (JNICALL *GetBooleanArrayElements)
    629       (JNIEnv *env, jbooleanArray array, jboolean *isCopy);
    630     jbyte * (JNICALL *GetByteArrayElements)
    631       (JNIEnv *env, jbyteArray array, jboolean *isCopy);
    632     jchar * (JNICALL *GetCharArrayElements)
    633       (JNIEnv *env, jcharArray array, jboolean *isCopy);
    634     jshort * (JNICALL *GetShortArrayElements)
    635       (JNIEnv *env, jshortArray array, jboolean *isCopy);
    636     jint * (JNICALL *GetIntArrayElements)
    637       (JNIEnv *env, jintArray array, jboolean *isCopy);
    638     jlong * (JNICALL *GetLongArrayElements)
    639       (JNIEnv *env, jlongArray array, jboolean *isCopy);
    640     jfloat * (JNICALL *GetFloatArrayElements)
    641       (JNIEnv *env, jfloatArray array, jboolean *isCopy);
    642     jdouble * (JNICALL *GetDoubleArrayElements)
    643       (JNIEnv *env, jdoubleArray array, jboolean *isCopy);
    644 
    645     void (JNICALL *ReleaseBooleanArrayElements)
    646       (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
    647     void (JNICALL *ReleaseByteArrayElements)
    648       (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
    649     void (JNICALL *ReleaseCharArrayElements)
    650       (JNIEnv *env, jcharArray array, jchar *elems, jint mode);
    651     void (JNICALL *ReleaseShortArrayElements)
    652       (JNIEnv *env, jshortArray array, jshort *elems, jint mode);
    653     void (JNICALL *ReleaseIntArrayElements)
    654       (JNIEnv *env, jintArray array, jint *elems, jint mode);
    655     void (JNICALL *ReleaseLongArrayElements)
    656       (JNIEnv *env, jlongArray array, jlong *elems, jint mode);
    657     void (JNICALL *ReleaseFloatArrayElements)
    658       (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
    659     void (JNICALL *ReleaseDoubleArrayElements)
    660       (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
    661 
    662     void (JNICALL *GetBooleanArrayRegion)
    663       (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
    664     void (JNICALL *GetByteArrayRegion)
    665       (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
    666     void (JNICALL *GetCharArrayRegion)
    667       (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
    668     void (JNICALL *GetShortArrayRegion)
    669       (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
    670     void (JNICALL *GetIntArrayRegion)
    671       (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
    672     void (JNICALL *GetLongArrayRegion)
    673       (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
    674     void (JNICALL *GetFloatArrayRegion)
    675       (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
    676     void (JNICALL *GetDoubleArrayRegion)
    677       (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
    678 
    679     void (JNICALL *SetBooleanArrayRegion)
    680       (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
    681     void (JNICALL *SetByteArrayRegion)
    682       (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
    683     void (JNICALL *SetCharArrayRegion)
    684       (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
    685     void (JNICALL *SetShortArrayRegion)
    686       (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
    687     void (JNICALL *SetIntArrayRegion)
    688       (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
    689     void (JNICALL *SetLongArrayRegion)
    690       (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
    691     void (JNICALL *SetFloatArrayRegion)
    692       (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
    693     void (JNICALL *SetDoubleArrayRegion)
    694       (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
    695 
    696     jint (JNICALL *RegisterNatives)
    697       (JNIEnv *env, jclass clazz, const JNINativeMethod *methods,
    698        jint nMethods);
    699     jint (JNICALL *UnregisterNatives)
    700       (JNIEnv *env, jclass clazz);
    701 
    702     jint (JNICALL *MonitorEnter)
    703       (JNIEnv *env, jobject obj);
    704     jint (JNICALL *MonitorExit)
    705       (JNIEnv *env, jobject obj);
    706 
    707     jint (JNICALL *GetJavaVM)
    708       (JNIEnv *env, JavaVM **vm);
    709 };
    710 
    711 /*
    712  * We use inlined functions for C++ so that programmers can write:
    713  *
    714  *    env->FindClass("java/lang/String")
    715  *
    716  * in C++ rather than:
    717  *
    718  *    (*env)->FindClass(env, "java/lang/String")
    719  *
    720  * in C.
    721  */
    722 
    723 struct JNIEnv_ {
    724     const struct JNINativeInterface_ *functions;
    725     void *reserved0;
    726     void *reserved1[6];
    727 #ifdef __cplusplus
    728 
    729     jint GetVersion() {
    730         return functions->GetVersion(this);
    731     }
    732     jclass DefineClass(const char *name, jobject loader, const jbyte *buf,
    733 		       jsize len) {
    734         return functions->DefineClass(this, name, loader, buf, len);
    735     }
    736     jclass FindClass(const char *name) {
    737         return functions->FindClass(this, name);
    738     }
    739     jclass GetSuperclass(jclass sub) {
    740         return functions->GetSuperclass(this, sub);
    741     }
    742     jboolean IsAssignableFrom(jclass sub, jclass sup) {
    743         return functions->IsAssignableFrom(this, sub, sup);
    744     }
    745 
    746     jint Throw(jthrowable obj) {
    747         return functions->Throw(this, obj);
    748     }
    749     jint ThrowNew(jclass clazz, const char *msg) {
    750         return functions->ThrowNew(this, clazz, msg);
    751     }
    752     jthrowable ExceptionOccurred() {
    753         return functions->ExceptionOccurred(this);
    754     }
    755     void ExceptionDescribe() {
    756         functions->ExceptionDescribe(this);
    757     }
    758     void ExceptionClear() {
    759         functions->ExceptionClear(this);
    760     }
    761     void FatalError(const char *msg) {
    762         functions->FatalError(this, msg);
    763     }
    764 
    765     jobject NewGlobalRef(jobject lobj) {
    766         return functions->NewGlobalRef(this,lobj);
    767     }
    768     void DeleteGlobalRef(jobject gref) {
    769         functions->DeleteGlobalRef(this,gref);
    770     }
    771     void DeleteLocalRef(jobject obj) {
    772         functions->DeleteLocalRef(this, obj);
    773     }
    774 
    775     jboolean IsSameObject(jobject obj1, jobject obj2) {
    776         return functions->IsSameObject(this,obj1,obj2);
    777     }
    778 
    779     jobject AllocObject(jclass clazz) {
    780         return functions->AllocObject(this,clazz);
    781     }
    782     jobject NewObject(jclass clazz, jmethodID methodID, ...) {
    783         va_list args;
    784 	jobject result;
    785 	va_start(args, methodID);
    786         result = functions->NewObjectV(this,clazz,methodID,args);
    787 	va_end(args);
    788 	return result;
    789     }
    790     jobject NewObjectV(jclass clazz, jmethodID methodID,
    791 		       va_list args) {
    792         return functions->NewObjectV(this,clazz,methodID,args);
    793     }
    794     jobject NewObjectA(jclass clazz, jmethodID methodID,
    795 		       jvalue *args) {
    796         return functions->NewObjectA(this,clazz,methodID,args);
    797     }
    798 
    799     jclass GetObjectClass(jobject obj) {
    800         return functions->GetObjectClass(this,obj);
    801     }
    802     jboolean IsInstanceOf(jobject obj, jclass clazz) {
    803         return functions->IsInstanceOf(this,obj,clazz);
    804     }
    805 
    806     jmethodID GetMethodID(jclass clazz, const char *name,
    807 			  const char *sig) {
    808         return functions->GetMethodID(this,clazz,name,sig);
    809     }
    810 
    811     jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) {
    812         va_list args;
    813 	jobject result;
    814 	va_start(args,methodID);
    815 	result = functions->CallObjectMethodV(this,obj,methodID,args);
    816 	va_end(args);
    817 	return result;
    818     }
    819     jobject CallObjectMethodV(jobject obj, jmethodID methodID,
    820 			va_list args) {
    821         return functions->CallObjectMethodV(this,obj,methodID,args);
    822     }
    823     jobject CallObjectMethodA(jobject obj, jmethodID methodID,
    824 			jvalue * args) {
    825         return functions->CallObjectMethodA(this,obj,methodID,args);
    826     }
    827 
    828     jboolean CallBooleanMethod(jobject obj,
    829 			       jmethodID methodID, ...) {
    830         va_list args;
    831 	jboolean result;
    832 	va_start(args,methodID);
    833 	result = functions->CallBooleanMethodV(this,obj,methodID,args);
    834 	va_end(args);
    835 	return result;
    836     }
    837     jboolean CallBooleanMethodV(jobject obj, jmethodID methodID,
    838 				va_list args) {
    839         return functions->CallBooleanMethodV(this,obj,methodID,args);
    840     }
    841     jboolean CallBooleanMethodA(jobject obj, jmethodID methodID,
    842 				jvalue * args) {
    843         return functions->CallBooleanMethodA(this,obj,methodID, args);
    844     }
    845 
    846     jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) {
    847         va_list args;
    848 	jbyte result;
    849 	va_start(args,methodID);
    850 	result = functions->CallByteMethodV(this,obj,methodID,args);
    851 	va_end(args);
    852 	return result;
    853     }
    854     jbyte CallByteMethodV(jobject obj, jmethodID methodID,
    855 			  va_list args) {
    856         return functions->CallByteMethodV(this,obj,methodID,args);
    857     }
    858     jbyte CallByteMethodA(jobject obj, jmethodID methodID,
    859 			  jvalue * args) {
    860         return functions->CallByteMethodA(this,obj,methodID,args);
    861     }
    862 
    863     jchar CallCharMethod(jobject obj, jmethodID methodID, ...) {
    864         va_list args;
    865 	jchar result;
    866 	va_start(args,methodID);
    867 	result = functions->CallCharMethodV(this,obj,methodID,args);
    868 	va_end(args);
    869 	return result;
    870     }
    871     jchar CallCharMethodV(jobject obj, jmethodID methodID,
    872 			  va_list args) {
    873         return functions->CallCharMethodV(this,obj,methodID,args);
    874     }
    875     jchar CallCharMethodA(jobject obj, jmethodID methodID,
    876 			  jvalue * args) {
    877         return functions->CallCharMethodA(this,obj,methodID,args);
    878     }
    879 
    880     jshort CallShortMethod(jobject obj, jmethodID methodID, ...) {
    881         va_list args;
    882 	jshort result;
    883 	va_start(args,methodID);
    884 	result = functions->CallShortMethodV(this,obj,methodID,args);
    885 	va_end(args);
    886 	return result;
    887     }
    888     jshort CallShortMethodV(jobject obj, jmethodID methodID,
    889 			    va_list args) {
    890         return functions->CallShortMethodV(this,obj,methodID,args);
    891     }
    892     jshort CallShortMethodA(jobject obj, jmethodID methodID,
    893 			    jvalue * args) {
    894         return functions->CallShortMethodA(this,obj,methodID,args);
    895     }
    896 
    897     jint CallIntMethod(jobject obj, jmethodID methodID, ...) {
    898         va_list args;
    899 	jint result;
    900 	va_start(args,methodID);
    901 	result = functions->CallIntMethodV(this,obj,methodID,args);
    902 	va_end(args);
    903 	return result;
    904     }
    905     jint CallIntMethodV(jobject obj, jmethodID methodID,
    906 			va_list args) {
    907         return functions->CallIntMethodV(this,obj,methodID,args);
    908     }
    909     jint CallIntMethodA(jobject obj, jmethodID methodID,
    910 			jvalue * args) {
    911         return functions->CallIntMethodA(this,obj,methodID,args);
    912     }
    913 
    914     jlong CallLongMethod(jobject obj, jmethodID methodID, ...) {
    915         va_list args;
    916 	jlong result;
    917 	va_start(args,methodID);
    918 	result = functions->CallLongMethodV(this,obj,methodID,args);
    919 	va_end(args);
    920 	return result;
    921     }
    922     jlong CallLongMethodV(jobject obj, jmethodID methodID,
    923 			  va_list args) {
    924         return functions->CallLongMethodV(this,obj,methodID,args);
    925     }
    926     jlong CallLongMethodA(jobject obj, jmethodID methodID,
    927 			  jvalue * args) {
    928         return functions->CallLongMethodA(this,obj,methodID,args);
    929     }
    930 
    931     jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) {
    932         va_list args;
    933 	jfloat result;
    934 	va_start(args,methodID);
    935 	result = functions->CallFloatMethodV(this,obj,methodID,args);
    936 	va_end(args);
    937 	return result;
    938     }
    939     jfloat CallFloatMethodV(jobject obj, jmethodID methodID,
    940 			    va_list args) {
    941         return functions->CallFloatMethodV(this,obj,methodID,args);
    942     }
    943     jfloat CallFloatMethodA(jobject obj, jmethodID methodID,
    944 			    jvalue * args) {
    945         return functions->CallFloatMethodA(this,obj,methodID,args);
    946     }
    947 
    948     jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) {
    949         va_list args;
    950 	jdouble result;
    951 	va_start(args,methodID);
    952 	result = functions->CallDoubleMethodV(this,obj,methodID,args);
    953 	va_end(args);
    954 	return result;
    955     }
    956     jdouble CallDoubleMethodV(jobject obj, jmethodID methodID,
    957 			va_list args) {
    958         return functions->CallDoubleMethodV(this,obj,methodID,args);
    959     }
    960     jdouble CallDoubleMethodA(jobject obj, jmethodID methodID,
    961 			jvalue * args) {
    962         return functions->CallDoubleMethodA(this,obj,methodID,args);
    963     }
    964 
    965     void CallVoidMethod(jobject obj, jmethodID methodID, ...) {
    966         va_list args;
    967 	va_start(args,methodID);
    968 	functions->CallVoidMethodV(this,obj,methodID,args);
    969 	va_end(args);
    970     }
    971     void CallVoidMethodV(jobject obj, jmethodID methodID,
    972 			 va_list args) {
    973         functions->CallVoidMethodV(this,obj,methodID,args);
    974     }
    975     void CallVoidMethodA(jobject obj, jmethodID methodID,
    976 			 jvalue * args) {
    977         functions->CallVoidMethodA(this,obj,methodID,args);
    978     }
    979 
    980     jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz,
    981 				       jmethodID methodID, ...) {
    982         va_list args;
    983 	jobject result;
    984 	va_start(args,methodID);
    985 	result = functions->CallNonvirtualObjectMethodV(this,obj,clazz,
    986 							methodID,args);
    987 	va_end(args);
    988 	return result;
    989     }
    990     jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz,
    991 					jmethodID methodID, va_list args) {
    992         return functions->CallNonvirtualObjectMethodV(this,obj,clazz,
    993 						      methodID,args);
    994     }
    995     jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz,
    996 					jmethodID methodID, jvalue * args) {
    997         return functions->CallNonvirtualObjectMethodA(this,obj,clazz,
    998 						      methodID,args);
    999     }
   1000 
   1001     jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz,
   1002 					 jmethodID methodID, ...) {
   1003         va_list args;
   1004 	jboolean result;
   1005 	va_start(args,methodID);
   1006 	result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
   1007 							 methodID,args);
   1008 	va_end(args);
   1009 	return result;
   1010     }
   1011     jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz,
   1012 					  jmethodID methodID, va_list args) {
   1013         return functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
   1014 						       methodID,args);
   1015     }
   1016     jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz,
   1017 					  jmethodID methodID, jvalue * args) {
   1018         return functions->CallNonvirtualBooleanMethodA(this,obj,clazz,
   1019 						       methodID, args);
   1020     }
   1021 
   1022     jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz,
   1023 				   jmethodID methodID, ...) {
   1024         va_list args;
   1025 	jbyte result;
   1026 	va_start(args,methodID);
   1027 	result = functions->CallNonvirtualByteMethodV(this,obj,clazz,
   1028 						      methodID,args);
   1029 	va_end(args);
   1030 	return result;
   1031     }
   1032     jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz,
   1033 				    jmethodID methodID, va_list args) {
   1034         return functions->CallNonvirtualByteMethodV(this,obj,clazz,
   1035 						    methodID,args);
   1036     }
   1037     jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz,
   1038 				    jmethodID methodID, jvalue * args) {
   1039         return functions->CallNonvirtualByteMethodA(this,obj,clazz,
   1040 						    methodID,args);
   1041     }
   1042 
   1043     jchar CallNonvirtualCharMethod(jobject obj, jclass clazz,
   1044 				   jmethodID methodID, ...) {
   1045         va_list args;
   1046 	jchar result;
   1047 	va_start(args,methodID);
   1048 	result = functions->CallNonvirtualCharMethodV(this,obj,clazz,
   1049 						      methodID,args);
   1050 	va_end(args);
   1051 	return result;
   1052     }
   1053     jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz,
   1054 				    jmethodID methodID, va_list args) {
   1055         return functions->CallNonvirtualCharMethodV(this,obj,clazz,
   1056 						    methodID,args);
   1057     }
   1058     jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz,
   1059 				    jmethodID methodID, jvalue * args) {
   1060         return functions->CallNonvirtualCharMethodA(this,obj,clazz,
   1061 						    methodID,args);
   1062     }
   1063 
   1064     jshort CallNonvirtualShortMethod(jobject obj, jclass clazz,
   1065 				     jmethodID methodID, ...) {
   1066         va_list args;
   1067 	jshort result;
   1068 	va_start(args,methodID);
   1069 	result = functions->CallNonvirtualShortMethodV(this,obj,clazz,
   1070 						       methodID,args);
   1071 	va_end(args);
   1072 	return result;
   1073     }
   1074     jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz,
   1075 				      jmethodID methodID, va_list args) {
   1076         return functions->CallNonvirtualShortMethodV(this,obj,clazz,
   1077 						     methodID,args);
   1078     }
   1079     jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,
   1080 				      jmethodID methodID, jvalue * args) {
   1081         return functions->CallNonvirtualShortMethodA(this,obj,clazz,
   1082 						     methodID,args);
   1083     }
   1084 
   1085     jint CallNonvirtualIntMethod(jobject obj, jclass clazz,
   1086 				 jmethodID methodID, ...) {
   1087         va_list args;
   1088 	jint result;
   1089 	va_start(args,methodID);
   1090 	result = functions->CallNonvirtualIntMethodV(this,obj,clazz,
   1091 						     methodID,args);
   1092 	va_end(args);
   1093 	return result;
   1094     }
   1095     jint CallNonvirtualIntMethodV(jobject obj, jclass clazz,
   1096 				  jmethodID methodID, va_list args) {
   1097         return functions->CallNonvirtualIntMethodV(this,obj,clazz,
   1098 						   methodID,args);
   1099     }
   1100     jint CallNonvirtualIntMethodA(jobject obj, jclass clazz,
   1101 				  jmethodID methodID, jvalue * args) {
   1102         return functions->CallNonvirtualIntMethodA(this,obj,clazz,
   1103 						   methodID,args);
   1104     }
   1105 
   1106     jlong CallNonvirtualLongMethod(jobject obj, jclass clazz,
   1107 				   jmethodID methodID, ...) {
   1108         va_list args;
   1109 	jlong result;
   1110 	va_start(args,methodID);
   1111 	result = functions->CallNonvirtualLongMethodV(this,obj,clazz,
   1112 						      methodID,args);
   1113 	va_end(args);
   1114 	return result;
   1115     }
   1116     jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz,
   1117 				    jmethodID methodID, va_list args) {
   1118         return functions->CallNonvirtualLongMethodV(this,obj,clazz,
   1119 						    methodID,args);
   1120     }
   1121     jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz,
   1122 				    jmethodID methodID, jvalue * args) {
   1123         return functions->CallNonvirtualLongMethodA(this,obj,clazz,
   1124 						    methodID,args);
   1125     }
   1126 
   1127     jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz,
   1128 				     jmethodID methodID, ...) {
   1129         va_list args;
   1130 	jfloat result;
   1131 	va_start(args,methodID);
   1132 	result = functions->CallNonvirtualFloatMethodV(this,obj,clazz,
   1133 						       methodID,args);
   1134 	va_end(args);
   1135 	return result;
   1136     }
   1137     jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz,
   1138 				      jmethodID methodID,
   1139 				      va_list args) {
   1140         return functions->CallNonvirtualFloatMethodV(this,obj,clazz,
   1141 						     methodID,args);
   1142     }
   1143     jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz,
   1144 				      jmethodID methodID,
   1145 				      jvalue * args) {
   1146         return functions->CallNonvirtualFloatMethodA(this,obj,clazz,
   1147 						     methodID,args);
   1148     }
   1149 
   1150     jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz,
   1151 				       jmethodID methodID, ...) {
   1152         va_list args;
   1153 	jdouble result;
   1154 	va_start(args,methodID);
   1155 	result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
   1156 							methodID,args);
   1157 	va_end(args);
   1158 	return result;
   1159     }
   1160     jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz,
   1161 					jmethodID methodID,
   1162 					va_list args) {
   1163         return functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
   1164 						      methodID,args);
   1165     }
   1166     jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz,
   1167 					jmethodID methodID,
   1168 					jvalue * args) {
   1169         return functions->CallNonvirtualDoubleMethodA(this,obj,clazz,
   1170 						      methodID,args);
   1171     }
   1172 
   1173     void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
   1174 				  jmethodID methodID, ...) {
   1175         va_list args;
   1176 	va_start(args,methodID);
   1177 	functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
   1178 	va_end(args);
   1179     }
   1180     void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
   1181 				   jmethodID methodID,
   1182 				   va_list args) {
   1183         functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
   1184     }
   1185     void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
   1186 				   jmethodID methodID,
   1187 				   jvalue * args) {
   1188         functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args);
   1189     }
   1190 
   1191     jfieldID GetFieldID(jclass clazz, const char *name,
   1192 			const char *sig) {
   1193         return functions->GetFieldID(this,clazz,name,sig);
   1194     }
   1195 
   1196     jobject GetObjectField(jobject obj, jfieldID fieldID) {
   1197         return functions->GetObjectField(this,obj,fieldID);
   1198     }
   1199     jboolean GetBooleanField(jobject obj, jfieldID fieldID) {
   1200         return functions->GetBooleanField(this,obj,fieldID);
   1201     }
   1202     jbyte GetByteField(jobject obj, jfieldID fieldID) {
   1203         return functions->GetByteField(this,obj,fieldID);
   1204     }
   1205     jchar GetCharField(jobject obj, jfieldID fieldID) {
   1206         return functions->GetCharField(this,obj,fieldID);
   1207     }
   1208     jshort GetShortField(jobject obj, jfieldID fieldID) {
   1209         return functions->GetShortField(this,obj,fieldID);
   1210     }
   1211     jint GetIntField(jobject obj, jfieldID fieldID) {
   1212         return functions->GetIntField(this,obj,fieldID);
   1213     }
   1214     jlong GetLongField(jobject obj, jfieldID fieldID) {
   1215         return functions->GetLongField(this,obj,fieldID);
   1216     }
   1217     jfloat GetFloatField(jobject obj, jfieldID fieldID) {
   1218         return functions->GetFloatField(this,obj,fieldID);
   1219     }
   1220     jdouble GetDoubleField(jobject obj, jfieldID fieldID) {
   1221         return functions->GetDoubleField(this,obj,fieldID);
   1222     }
   1223 
   1224     void SetObjectField(jobject obj, jfieldID fieldID, jobject val) {
   1225         functions->SetObjectField(this,obj,fieldID,val);
   1226     }
   1227     void SetBooleanField(jobject obj, jfieldID fieldID,
   1228 			 jboolean val) {
   1229         functions->SetBooleanField(this,obj,fieldID,val);
   1230     }
   1231     void SetByteField(jobject obj, jfieldID fieldID,
   1232 		      jbyte val) {
   1233         functions->SetByteField(this,obj,fieldID,val);
   1234     }
   1235     void SetCharField(jobject obj, jfieldID fieldID,
   1236 		      jchar val) {
   1237         functions->SetCharField(this,obj,fieldID,val);
   1238     }
   1239     void SetShortField(jobject obj, jfieldID fieldID,
   1240 		       jshort val) {
   1241         functions->SetShortField(this,obj,fieldID,val);
   1242     }
   1243     void SetIntField(jobject obj, jfieldID fieldID,
   1244 		     jint val) {
   1245         functions->SetIntField(this,obj,fieldID,val);
   1246     }
   1247     void SetLongField(jobject obj, jfieldID fieldID,
   1248 		      jlong val) {
   1249         functions->SetLongField(this,obj,fieldID,val);
   1250     }
   1251     void SetFloatField(jobject obj, jfieldID fieldID,
   1252 		       jfloat val) {
   1253         functions->SetFloatField(this,obj,fieldID,val);
   1254     }
   1255     void SetDoubleField(jobject obj, jfieldID fieldID,
   1256 			jdouble val) {
   1257         functions->SetDoubleField(this,obj,fieldID,val);
   1258     }
   1259 
   1260     jmethodID GetStaticMethodID(jclass clazz, const char *name,
   1261 				const char *sig) {
   1262         return functions->GetStaticMethodID(this,clazz,name,sig);
   1263     }
   1264 
   1265     jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID,
   1266 			     ...) {
   1267         va_list args;
   1268 	jobject result;
   1269 	va_start(args,methodID);
   1270 	result = functions->CallStaticObjectMethodV(this,clazz,methodID,args);
   1271 	va_end(args);
   1272 	return result;
   1273     }
   1274     jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID,
   1275 			      va_list args) {
   1276         return functions->CallStaticObjectMethodV(this,clazz,methodID,args);
   1277     }
   1278     jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID,
   1279 			      jvalue *args) {
   1280         return functions->CallStaticObjectMethodA(this,clazz,methodID,args);
   1281     }
   1282 
   1283     jboolean CallStaticBooleanMethod(jclass clazz,
   1284 				     jmethodID methodID, ...) {
   1285         va_list args;
   1286 	jboolean result;
   1287 	va_start(args,methodID);
   1288 	result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
   1289 	va_end(args);
   1290 	return result;
   1291     }
   1292     jboolean CallStaticBooleanMethodV(jclass clazz,
   1293 				      jmethodID methodID, va_list args) {
   1294         return functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
   1295     }
   1296     jboolean CallStaticBooleanMethodA(jclass clazz,
   1297 				      jmethodID methodID, jvalue *args) {
   1298         return functions->CallStaticBooleanMethodA(this,clazz,methodID,args);
   1299     }
   1300 
   1301     jbyte CallStaticByteMethod(jclass clazz,
   1302 			       jmethodID methodID, ...) {
   1303         va_list args;
   1304 	jbyte result;
   1305 	va_start(args,methodID);
   1306 	result = functions->CallStaticByteMethodV(this,clazz,methodID,args);
   1307 	va_end(args);
   1308 	return result;
   1309     }
   1310     jbyte CallStaticByteMethodV(jclass clazz,
   1311 				jmethodID methodID, va_list args) {
   1312         return functions->CallStaticByteMethodV(this,clazz,methodID,args);
   1313     }
   1314     jbyte CallStaticByteMethodA(jclass clazz,
   1315 				jmethodID methodID, jvalue *args) {
   1316         return functions->CallStaticByteMethodA(this,clazz,methodID,args);
   1317     }
   1318 
   1319     jchar CallStaticCharMethod(jclass clazz,
   1320 			       jmethodID methodID, ...) {
   1321         va_list args;
   1322 	jchar result;
   1323 	va_start(args,methodID);
   1324 	result = functions->CallStaticCharMethodV(this,clazz,methodID,args);
   1325 	va_end(args);
   1326 	return result;
   1327     }
   1328     jchar CallStaticCharMethodV(jclass clazz,
   1329 				jmethodID methodID, va_list args) {
   1330         return functions->CallStaticCharMethodV(this,clazz,methodID,args);
   1331     }
   1332     jchar CallStaticCharMethodA(jclass clazz,
   1333 				jmethodID methodID, jvalue *args) {
   1334         return functions->CallStaticCharMethodA(this,clazz,methodID,args);
   1335     }
   1336 
   1337     jshort CallStaticShortMethod(jclass clazz,
   1338 				 jmethodID methodID, ...) {
   1339         va_list args;
   1340 	jshort result;
   1341 	va_start(args,methodID);
   1342 	result = functions->CallStaticShortMethodV(this,clazz,methodID,args);
   1343 	va_end(args);
   1344 	return result;
   1345     }
   1346     jshort CallStaticShortMethodV(jclass clazz,
   1347 				  jmethodID methodID, va_list args) {
   1348         return functions->CallStaticShortMethodV(this,clazz,methodID,args);
   1349     }
   1350     jshort CallStaticShortMethodA(jclass clazz,
   1351 				  jmethodID methodID, jvalue *args) {
   1352         return functions->CallStaticShortMethodA(this,clazz,methodID,args);
   1353     }
   1354 
   1355     jint CallStaticIntMethod(jclass clazz,
   1356 			     jmethodID methodID, ...) {
   1357         va_list args;
   1358 	jint result;
   1359 	va_start(args,methodID);
   1360 	result = functions->CallStaticIntMethodV(this,clazz,methodID,args);
   1361 	va_end(args);
   1362 	return result;
   1363     }
   1364     jint CallStaticIntMethodV(jclass clazz,
   1365 			      jmethodID methodID, va_list args) {
   1366         return functions->CallStaticIntMethodV(this,clazz,methodID,args);
   1367     }
   1368     jint CallStaticIntMethodA(jclass clazz,
   1369 			      jmethodID methodID, jvalue *args) {
   1370         return functions->CallStaticIntMethodA(this,clazz,methodID,args);
   1371     }
   1372 
   1373     jlong CallStaticLongMethod(jclass clazz,
   1374 			       jmethodID methodID, ...) {
   1375         va_list args;
   1376 	jlong result;
   1377 	va_start(args,methodID);
   1378 	result = functions->CallStaticLongMethodV(this,clazz,methodID,args);
   1379 	va_end(args);
   1380 	return result;
   1381     }
   1382     jlong CallStaticLongMethodV(jclass clazz,
   1383 				jmethodID methodID, va_list args) {
   1384         return functions->CallStaticLongMethodV(this,clazz,methodID,args);
   1385     }
   1386     jlong CallStaticLongMethodA(jclass clazz,
   1387 				jmethodID methodID, jvalue *args) {
   1388         return functions->CallStaticLongMethodA(this,clazz,methodID,args);
   1389     }
   1390 
   1391     jfloat CallStaticFloatMethod(jclass clazz,
   1392 				 jmethodID methodID, ...) {
   1393         va_list args;
   1394 	jfloat result;
   1395 	va_start(args,methodID);
   1396 	result = functions->CallStaticFloatMethodV(this,clazz,methodID,args);
   1397 	va_end(args);
   1398 	return result;
   1399     }
   1400     jfloat CallStaticFloatMethodV(jclass clazz,
   1401 				  jmethodID methodID, va_list args) {
   1402         return functions->CallStaticFloatMethodV(this,clazz,methodID,args);
   1403     }
   1404     jfloat CallStaticFloatMethodA(jclass clazz,
   1405 				  jmethodID methodID, jvalue *args) {
   1406         return functions->CallStaticFloatMethodA(this,clazz,methodID,args);
   1407     }
   1408 
   1409     jdouble CallStaticDoubleMethod(jclass clazz,
   1410 				   jmethodID methodID, ...) {
   1411         va_list args;
   1412 	jdouble result;
   1413 	va_start(args,methodID);
   1414 	result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
   1415 	va_end(args);
   1416 	return result;
   1417     }
   1418     jdouble CallStaticDoubleMethodV(jclass clazz,
   1419 				    jmethodID methodID, va_list args) {
   1420         return functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
   1421     }
   1422     jdouble CallStaticDoubleMethodA(jclass clazz,
   1423 				    jmethodID methodID, jvalue *args) {
   1424         return functions->CallStaticDoubleMethodA(this,clazz,methodID,args);
   1425     }
   1426 
   1427     void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {
   1428         va_list args;
   1429 	va_start(args,methodID);
   1430 	functions->CallStaticVoidMethodV(this,cls,methodID,args);
   1431 	va_end(args);
   1432     }
   1433     void CallStaticVoidMethodV(jclass cls, jmethodID methodID,
   1434 			       va_list args) {
   1435         functions->CallStaticVoidMethodV(this,cls,methodID,args);
   1436     }
   1437     void CallStaticVoidMethodA(jclass cls, jmethodID methodID,
   1438 			       jvalue * args) {
   1439         functions->CallStaticVoidMethodA(this,cls,methodID,args);
   1440     }
   1441 
   1442     jfieldID GetStaticFieldID(jclass clazz, const char *name,
   1443 			      const char *sig) {
   1444         return functions->GetStaticFieldID(this,clazz,name,sig);
   1445     }
   1446     jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) {
   1447         return functions->GetStaticObjectField(this,clazz,fieldID);
   1448     }
   1449     jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) {
   1450         return functions->GetStaticBooleanField(this,clazz,fieldID);
   1451     }
   1452     jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) {
   1453         return functions->GetStaticByteField(this,clazz,fieldID);
   1454     }
   1455     jchar GetStaticCharField(jclass clazz, jfieldID fieldID) {
   1456         return functions->GetStaticCharField(this,clazz,fieldID);
   1457     }
   1458     jshort GetStaticShortField(jclass clazz, jfieldID fieldID) {
   1459         return functions->GetStaticShortField(this,clazz,fieldID);
   1460     }
   1461     jint GetStaticIntField(jclass clazz, jfieldID fieldID) {
   1462         return functions->GetStaticIntField(this,clazz,fieldID);
   1463     }
   1464     jlong GetStaticLongField(jclass clazz, jfieldID fieldID) {
   1465         return functions->GetStaticLongField(this,clazz,fieldID);
   1466     }
   1467     jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) {
   1468         return functions->GetStaticFloatField(this,clazz,fieldID);
   1469     }
   1470     jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) {
   1471         return functions->GetStaticDoubleField(this,clazz,fieldID);
   1472     }
   1473 
   1474     void SetStaticObjectField(jclass clazz, jfieldID fieldID,
   1475 			jobject value) {
   1476       functions->SetStaticObjectField(this,clazz,fieldID,value);
   1477     }
   1478     void SetStaticBooleanField(jclass clazz, jfieldID fieldID,
   1479 			jboolean value) {
   1480       functions->SetStaticBooleanField(this,clazz,fieldID,value);
   1481     }
   1482     void SetStaticByteField(jclass clazz, jfieldID fieldID,
   1483 			jbyte value) {
   1484       functions->SetStaticByteField(this,clazz,fieldID,value);
   1485     }
   1486     void SetStaticCharField(jclass clazz, jfieldID fieldID,
   1487 			jchar value) {
   1488       functions->SetStaticCharField(this,clazz,fieldID,value);
   1489     }
   1490     void SetStaticShortField(jclass clazz, jfieldID fieldID,
   1491 			jshort value) {
   1492       functions->SetStaticShortField(this,clazz,fieldID,value);
   1493     }
   1494     void SetStaticIntField(jclass clazz, jfieldID fieldID,
   1495 			jint value) {
   1496       functions->SetStaticIntField(this,clazz,fieldID,value);
   1497     }
   1498     void SetStaticLongField(jclass clazz, jfieldID fieldID,
   1499 			jlong value) {
   1500       functions->SetStaticLongField(this,clazz,fieldID,value);
   1501     }
   1502     void SetStaticFloatField(jclass clazz, jfieldID fieldID,
   1503 			jfloat value) {
   1504       functions->SetStaticFloatField(this,clazz,fieldID,value);
   1505     }
   1506     void SetStaticDoubleField(jclass clazz, jfieldID fieldID,
   1507 			jdouble value) {
   1508       functions->SetStaticDoubleField(this,clazz,fieldID,value);
   1509     }
   1510 
   1511     jstring NewString(const jchar *unicode, jsize len) {
   1512         return functions->NewString(this,unicode,len);
   1513     }
   1514     jsize GetStringLength(jstring str) {
   1515         return functions->GetStringLength(this,str);
   1516     }
   1517     const jchar *GetStringChars(jstring str, jboolean *isCopy) {
   1518         return functions->GetStringChars(this,str,isCopy);
   1519     }
   1520     void ReleaseStringChars(jstring str, const jchar *chars) {
   1521         functions->ReleaseStringChars(this,str,chars);
   1522     }
   1523 
   1524     jstring NewStringUTF(const char *utf) {
   1525         return functions->NewStringUTF(this,utf);
   1526     }
   1527     jsize GetStringUTFLength(jstring str) {
   1528         return functions->GetStringUTFLength(this,str);
   1529     }
   1530     const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
   1531         return functions->GetStringUTFChars(this,str,isCopy);
   1532     }
   1533     void ReleaseStringUTFChars(jstring str, const char* chars) {
   1534         functions->ReleaseStringUTFChars(this,str,chars);
   1535     }
   1536 
   1537     jsize GetArrayLength(jarray array) {
   1538         return functions->GetArrayLength(this,array);
   1539     }
   1540 
   1541     jobjectArray NewObjectArray(jsize len, jclass clazz,
   1542 				jobject init) {
   1543         return functions->NewObjectArray(this,len,clazz,init);
   1544     }
   1545     jobject GetObjectArrayElement(jobjectArray array, jsize index) {
   1546         return functions->GetObjectArrayElement(this,array,index);
   1547     }
   1548     void SetObjectArrayElement(jobjectArray array, jsize index,
   1549 			       jobject val) {
   1550         functions->SetObjectArrayElement(this,array,index,val);
   1551     }
   1552 
   1553     jbooleanArray NewBooleanArray(jsize len) {
   1554         return functions->NewBooleanArray(this,len);
   1555     }
   1556     jbyteArray NewByteArray(jsize len) {
   1557         return functions->NewByteArray(this,len);
   1558     }
   1559     jcharArray NewCharArray(jsize len) {
   1560         return functions->NewCharArray(this,len);
   1561     }
   1562     jshortArray NewShortArray(jsize len) {
   1563         return functions->NewShortArray(this,len);
   1564     }
   1565     jintArray NewIntArray(jsize len) {
   1566         return functions->NewIntArray(this,len);
   1567     }
   1568     jlongArray NewLongArray(jsize len) {
   1569         return functions->NewLongArray(this,len);
   1570     }
   1571     jfloatArray NewFloatArray(jsize len) {
   1572         return functions->NewFloatArray(this,len);
   1573     }
   1574     jdoubleArray NewDoubleArray(jsize len) {
   1575         return functions->NewDoubleArray(this,len);
   1576     }
   1577 
   1578     jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) {
   1579         return functions->GetBooleanArrayElements(this,array,isCopy);
   1580     }
   1581     jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) {
   1582         return functions->GetByteArrayElements(this,array,isCopy);
   1583     }
   1584     jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) {
   1585         return functions->GetCharArrayElements(this,array,isCopy);
   1586     }
   1587     jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) {
   1588         return functions->GetShortArrayElements(this,array,isCopy);
   1589     }
   1590     jint * GetIntArrayElements(jintArray array, jboolean *isCopy) {
   1591         return functions->GetIntArrayElements(this,array,isCopy);
   1592     }
   1593     jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) {
   1594         return functions->GetLongArrayElements(this,array,isCopy);
   1595     }
   1596     jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) {
   1597         return functions->GetFloatArrayElements(this,array,isCopy);
   1598     }
   1599     jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) {
   1600         return functions->GetDoubleArrayElements(this,array,isCopy);
   1601     }
   1602 
   1603     void ReleaseBooleanArrayElements(jbooleanArray array,
   1604 				     jboolean *elems,
   1605 				     jint mode) {
   1606         functions->ReleaseBooleanArrayElements(this,array,elems,mode);
   1607     }
   1608     void ReleaseByteArrayElements(jbyteArray array,
   1609 				  jbyte *elems,
   1610 				  jint mode) {
   1611         functions->ReleaseByteArrayElements(this,array,elems,mode);
   1612     }
   1613     void ReleaseCharArrayElements(jcharArray array,
   1614 				  jchar *elems,
   1615 				  jint mode) {
   1616         functions->ReleaseCharArrayElements(this,array,elems,mode);
   1617     }
   1618     void ReleaseShortArrayElements(jshortArray array,
   1619 				   jshort *elems,
   1620 				   jint mode) {
   1621         functions->ReleaseShortArrayElements(this,array,elems,mode);
   1622     }
   1623     void ReleaseIntArrayElements(jintArray array,
   1624 				 jint *elems,
   1625 				 jint mode) {
   1626         functions->ReleaseIntArrayElements(this,array,elems,mode);
   1627     }
   1628     void ReleaseLongArrayElements(jlongArray array,
   1629 				  jlong *elems,
   1630 				  jint mode) {
   1631         functions->ReleaseLongArrayElements(this,array,elems,mode);
   1632     }
   1633     void ReleaseFloatArrayElements(jfloatArray array,
   1634 				   jfloat *elems,
   1635 				   jint mode) {
   1636         functions->ReleaseFloatArrayElements(this,array,elems,mode);
   1637     }
   1638     void ReleaseDoubleArrayElements(jdoubleArray array,
   1639 				    jdouble *elems,
   1640 				    jint mode) {
   1641         functions->ReleaseDoubleArrayElements(this,array,elems,mode);
   1642     }
   1643 
   1644     void GetBooleanArrayRegion(jbooleanArray array,
   1645 			       jsize start, jsize len, jboolean *buf) {
   1646         functions->GetBooleanArrayRegion(this,array,start,len,buf);
   1647     }
   1648     void GetByteArrayRegion(jbyteArray array,
   1649 			    jsize start, jsize len, jbyte *buf) {
   1650         functions->GetByteArrayRegion(this,array,start,len,buf);
   1651     }
   1652     void GetCharArrayRegion(jcharArray array,
   1653 			    jsize start, jsize len, jchar *buf) {
   1654         functions->GetCharArrayRegion(this,array,start,len,buf);
   1655     }
   1656     void GetShortArrayRegion(jshortArray array,
   1657 			     jsize start, jsize len, jshort *buf) {
   1658         functions->GetShortArrayRegion(this,array,start,len,buf);
   1659     }
   1660     void GetIntArrayRegion(jintArray array,
   1661 			   jsize start, jsize len, jint *buf) {
   1662         functions->GetIntArrayRegion(this,array,start,len,buf);
   1663     }
   1664     void GetLongArrayRegion(jlongArray array,
   1665 			    jsize start, jsize len, jlong *buf) {
   1666         functions->GetLongArrayRegion(this,array,start,len,buf);
   1667     }
   1668     void GetFloatArrayRegion(jfloatArray array,
   1669 			     jsize start, jsize len, jfloat *buf) {
   1670         functions->GetFloatArrayRegion(this,array,start,len,buf);
   1671     }
   1672     void GetDoubleArrayRegion(jdoubleArray array,
   1673 			      jsize start, jsize len, jdouble *buf) {
   1674         functions->GetDoubleArrayRegion(this,array,start,len,buf);
   1675     }
   1676 
   1677     void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
   1678 			       jboolean *buf) {
   1679         functions->SetBooleanArrayRegion(this,array,start,len,buf);
   1680     }
   1681     void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
   1682 			    jbyte *buf) {
   1683         functions->SetByteArrayRegion(this,array,start,len,buf);
   1684     }
   1685     void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
   1686 			    jchar *buf) {
   1687         functions->SetCharArrayRegion(this,array,start,len,buf);
   1688     }
   1689     void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
   1690 			     jshort *buf) {
   1691         functions->SetShortArrayRegion(this,array,start,len,buf);
   1692     }
   1693     void SetIntArrayRegion(jintArray array, jsize start, jsize len,
   1694 			   jint *buf) {
   1695         functions->SetIntArrayRegion(this,array,start,len,buf);
   1696     }
   1697     void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
   1698 			    jlong *buf) {
   1699         functions->SetLongArrayRegion(this,array,start,len,buf);
   1700     }
   1701     void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
   1702 			     jfloat *buf) {
   1703         functions->SetFloatArrayRegion(this,array,start,len,buf);
   1704     }
   1705     void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
   1706 			      jdouble *buf) {
   1707         functions->SetDoubleArrayRegion(this,array,start,len,buf);
   1708     }
   1709 
   1710     jint RegisterNatives(jclass clazz, const JNINativeMethod *methods,
   1711 			 jint nMethods) {
   1712         return functions->RegisterNatives(this,clazz,methods,nMethods);
   1713     }
   1714     jint UnregisterNatives(jclass clazz) {
   1715         return functions->UnregisterNatives(this,clazz);
   1716     }
   1717 
   1718     jint MonitorEnter(jobject obj) {
   1719         return functions->MonitorEnter(this,obj);
   1720     }
   1721     jint MonitorExit(jobject obj) {
   1722         return functions->MonitorExit(this,obj);
   1723     }
   1724 
   1725     jint GetJavaVM(JavaVM **vm) {
   1726         return functions->GetJavaVM(this,vm);
   1727     }
   1728 
   1729 #endif /* __cplusplus */
   1730 };
   1731 
   1732 /* These structures will be VM-specific. */
   1733 
   1734 typedef struct JDK1_1InitArgs {
   1735     jint version;
   1736 
   1737     char **properties;
   1738     jint checkSource;
   1739     jint nativeStackSize;
   1740     jint javaStackSize;
   1741     jint minHeapSize;
   1742     jint maxHeapSize;
   1743     jint verifyMode;
   1744     char *classpath;
   1745 
   1746     jint (JNICALL *vfprintf)(FILE *fp, const char *format, va_list args);
   1747     void (JNICALL *exit)(jint code);
   1748     void (JNICALL *abort)();
   1749 
   1750     jint enableClassGC;
   1751     jint enableVerboseGC;
   1752     jint disableAsyncGC;
   1753     jint verbose;
   1754     jboolean debugging;
   1755     jint debugPort;
   1756 } JDK1_1InitArgs;
   1757 
   1758 typedef struct JDK1_1AttachArgs {
   1759     void * __padding; /* C compilers don't allow empty structures. */
   1760 } JDK1_1AttachArgs;
   1761 
   1762 /* End VM-specific. */
   1763 
   1764 struct JNIInvokeInterface_ {
   1765     void *reserved0;
   1766     void *reserved1;
   1767     void *reserved2;
   1768 
   1769     jint (JNICALL *DestroyJavaVM)(JavaVM *vm);
   1770 
   1771     jint (JNICALL *AttachCurrentThread)
   1772       (JavaVM *vm, JNIEnv **penv, void *args);
   1773 
   1774     jint (JNICALL *DetachCurrentThread)(JavaVM *vm);
   1775 };
   1776 
   1777 struct JavaVM_ {
   1778     const struct JNIInvokeInterface_ *functions;
   1779     void *reserved0;
   1780     void *reserved1;
   1781     void *reserved2;
   1782 #ifdef __cplusplus
   1783 
   1784     jint DestroyJavaVM() {
   1785         return functions->DestroyJavaVM(this);
   1786     }
   1787     jint AttachCurrentThread(JNIEnv **penv, void *args) {
   1788         return functions->AttachCurrentThread(this, penv, args);
   1789     }
   1790     jint DetachCurrentThread() {
   1791         return functions->DetachCurrentThread(this);
   1792     }
   1793 
   1794 #endif
   1795 };
   1796 
   1797 JNI_PUBLIC_API(void) JNI_GetDefaultJavaVMInitArgs(void *);
   1798 
   1799 JNI_PUBLIC_API(jint) JNI_CreateJavaVM(JavaVM **, JNIEnv **, void *);
   1800 
   1801 JNI_PUBLIC_API(jint) JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
   1802 JNI_PUBLIC_API(jref) JNI_MakeLocalRef(JNIEnv *pJNIEnv, void *pHObject);
   1803 
   1804 #ifdef __cplusplus
   1805 } /* extern "C" */
   1806 #endif /* __cplusplus */
   1807 
   1808 #endif /* JNI_H */
   1809 
   1810 
   1811