Back to index

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