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