1 //krazy:excludeall=copyright
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is the Java Runtime Interface.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation and Sun Microsystems, Inc.
19 * Portions created by the Initial Developer are Copyright (C) 1993-1996
20 * the Initial Developer. All Rights Reserved.
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
44 /* jni_md.h contains the machine-dependent typedefs for jbyte, jint
57 typedef unsigned char jboolean
;
58 typedef unsigned short jchar
;
61 typedef double jdouble
;
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
{};
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
;
101 typedef struct _jobject
*jobject
;
102 typedef jobject jclass
;
103 typedef jobject jthrowable
;
104 typedef jobject jstring
;
105 typedef jobject jarray
;
106 typedef jarray jbooleanArray
;
107 typedef jarray jbyteArray
;
108 typedef jarray jcharArray
;
109 typedef jarray jshortArray
;
110 typedef jarray jintArray
;
111 typedef jarray jlongArray
;
112 typedef jarray jfloatArray
;
113 typedef jarray jdoubleArray
;
114 typedef jarray jobjectArray
;
118 #if 0 /* moved to jri_md.h */
119 typedef jobject jref
; /* For transition---not meant to be part of public
123 typedef union jvalue
{
136 typedef struct _jfieldID
*jfieldID
;
139 typedef struct _jmethodID
*jmethodID
;
149 * possible return values for JNI functions.
156 * used in ReleaseScalarArrayElements
163 * used in RegisterNatives to describe native method name, signature,
164 * and function pointer.
174 * JNI Native Method Interface.
177 struct JNINativeInterface_
;
182 typedef JNIEnv_ JNIEnv
;
184 typedef const struct JNINativeInterface_
*JNIEnv
;
188 * JNI Invocation Interface.
191 struct JNIInvokeInterface_
;
196 typedef JavaVM_ JavaVM
;
198 typedef const struct JNIInvokeInterface_
*JavaVM
;
201 struct JNINativeInterface_
{
207 jint (JNICALL
*GetVersion
)(JNIEnv
*env
);
209 jclass (JNICALL
*DefineClass
)
210 (JNIEnv
*env
, const char *name
, jobject loader
, const jbyte
*buf
,
212 jclass (JNICALL
*FindClass
)
213 (JNIEnv
*env
, const char *name
);
219 jclass (JNICALL
*GetSuperclass
)
220 (JNIEnv
*env
, jclass sub
);
221 jboolean (JNICALL
*IsAssignableFrom
)
222 (JNIEnv
*env
, jclass sub
, jclass sup
);
226 jint (JNICALL
*Throw
)
227 (JNIEnv
*env
, jthrowable obj
);
228 jint (JNICALL
*ThrowNew
)
229 (JNIEnv
*env
, jclass clazz
, const char *msg
);
230 jthrowable (JNICALL
*ExceptionOccurred
)
232 void (JNICALL
*ExceptionDescribe
)
234 void (JNICALL
*ExceptionClear
)
236 void (JNICALL
*FatalError
)
237 (JNIEnv
*env
, const char *msg
);
241 jobject (JNICALL
*NewGlobalRef
)
242 (JNIEnv
*env
, jobject lobj
);
243 void (JNICALL
*DeleteGlobalRef
)
244 (JNIEnv
*env
, jobject gref
);
245 void (JNICALL
*DeleteLocalRef
)
246 (JNIEnv
*env
, jobject obj
);
247 jboolean (JNICALL
*IsSameObject
)
248 (JNIEnv
*env
, jobject obj1
, jobject obj2
);
252 jobject (JNICALL
*AllocObject
)
253 (JNIEnv
*env
, jclass clazz
);
254 jobject (JNICALL
*NewObject
)
255 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
256 jobject (JNICALL
*NewObjectV
)
257 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
258 jobject (JNICALL
*NewObjectA
)
259 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
261 jclass (JNICALL
*GetObjectClass
)
262 (JNIEnv
*env
, jobject obj
);
263 jboolean (JNICALL
*IsInstanceOf
)
264 (JNIEnv
*env
, jobject obj
, jclass clazz
);
266 jmethodID (JNICALL
*GetMethodID
)
267 (JNIEnv
*env
, jclass clazz
, const char *name
, const char *sig
);
269 jobject (JNICALL
*CallObjectMethod
)
270 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
271 jobject (JNICALL
*CallObjectMethodV
)
272 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
273 jobject (JNICALL
*CallObjectMethodA
)
274 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
* args
);
276 jboolean (JNICALL
*CallBooleanMethod
)
277 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
278 jboolean (JNICALL
*CallBooleanMethodV
)
279 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
280 jboolean (JNICALL
*CallBooleanMethodA
)
281 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
* args
);
283 jbyte (JNICALL
*CallByteMethod
)
284 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
285 jbyte (JNICALL
*CallByteMethodV
)
286 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
287 jbyte (JNICALL
*CallByteMethodA
)
288 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
290 jchar (JNICALL
*CallCharMethod
)
291 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
292 jchar (JNICALL
*CallCharMethodV
)
293 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
294 jchar (JNICALL
*CallCharMethodA
)
295 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
297 jshort (JNICALL
*CallShortMethod
)
298 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
299 jshort (JNICALL
*CallShortMethodV
)
300 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
301 jshort (JNICALL
*CallShortMethodA
)
302 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
304 jint (JNICALL
*CallIntMethod
)
305 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
306 jint (JNICALL
*CallIntMethodV
)
307 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
308 jint (JNICALL
*CallIntMethodA
)
309 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
311 jlong (JNICALL
*CallLongMethod
)
312 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
313 jlong (JNICALL
*CallLongMethodV
)
314 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
315 jlong (JNICALL
*CallLongMethodA
)
316 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
318 jfloat (JNICALL
*CallFloatMethod
)
319 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
320 jfloat (JNICALL
*CallFloatMethodV
)
321 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
322 jfloat (JNICALL
*CallFloatMethodA
)
323 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
325 jdouble (JNICALL
*CallDoubleMethod
)
326 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
327 jdouble (JNICALL
*CallDoubleMethodV
)
328 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
329 jdouble (JNICALL
*CallDoubleMethodA
)
330 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
332 void (JNICALL
*CallVoidMethod
)
333 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
334 void (JNICALL
*CallVoidMethodV
)
335 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
336 void (JNICALL
*CallVoidMethodA
)
337 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
* args
);
339 jobject (JNICALL
*CallNonvirtualObjectMethod
)
340 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
341 jobject (JNICALL
*CallNonvirtualObjectMethodV
)
342 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
344 jobject (JNICALL
*CallNonvirtualObjectMethodA
)
345 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
348 jboolean (JNICALL
*CallNonvirtualBooleanMethod
)
349 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
350 jboolean (JNICALL
*CallNonvirtualBooleanMethodV
)
351 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
353 jboolean (JNICALL
*CallNonvirtualBooleanMethodA
)
354 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
357 jbyte (JNICALL
*CallNonvirtualByteMethod
)
358 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
359 jbyte (JNICALL
*CallNonvirtualByteMethodV
)
360 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
362 jbyte (JNICALL
*CallNonvirtualByteMethodA
)
363 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
366 jchar (JNICALL
*CallNonvirtualCharMethod
)
367 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
368 jchar (JNICALL
*CallNonvirtualCharMethodV
)
369 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
371 jchar (JNICALL
*CallNonvirtualCharMethodA
)
372 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
375 jshort (JNICALL
*CallNonvirtualShortMethod
)
376 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
377 jshort (JNICALL
*CallNonvirtualShortMethodV
)
378 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
380 jshort (JNICALL
*CallNonvirtualShortMethodA
)
381 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
384 jint (JNICALL
*CallNonvirtualIntMethod
)
385 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
386 jint (JNICALL
*CallNonvirtualIntMethodV
)
387 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
389 jint (JNICALL
*CallNonvirtualIntMethodA
)
390 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
393 jlong (JNICALL
*CallNonvirtualLongMethod
)
394 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
395 jlong (JNICALL
*CallNonvirtualLongMethodV
)
396 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
398 jlong (JNICALL
*CallNonvirtualLongMethodA
)
399 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
402 jfloat (JNICALL
*CallNonvirtualFloatMethod
)
403 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
404 jfloat (JNICALL
*CallNonvirtualFloatMethodV
)
405 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
407 jfloat (JNICALL
*CallNonvirtualFloatMethodA
)
408 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
411 jdouble (JNICALL
*CallNonvirtualDoubleMethod
)
412 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
413 jdouble (JNICALL
*CallNonvirtualDoubleMethodV
)
414 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
416 jdouble (JNICALL
*CallNonvirtualDoubleMethodA
)
417 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
420 void (JNICALL
*CallNonvirtualVoidMethod
)
421 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
422 void (JNICALL
*CallNonvirtualVoidMethodV
)
423 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
425 void (JNICALL
*CallNonvirtualVoidMethodA
)
426 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
429 jfieldID (JNICALL
*GetFieldID
)
430 (JNIEnv
*env
, jclass clazz
, const char *name
, const char *sig
);
432 jobject (JNICALL
*GetObjectField
)
433 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
434 jboolean (JNICALL
*GetBooleanField
)
435 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
436 jbyte (JNICALL
*GetByteField
)
437 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
438 jchar (JNICALL
*GetCharField
)
439 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
440 jshort (JNICALL
*GetShortField
)
441 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
442 jint (JNICALL
*GetIntField
)
443 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
444 jlong (JNICALL
*GetLongField
)
445 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
446 jfloat (JNICALL
*GetFloatField
)
447 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
448 jdouble (JNICALL
*GetDoubleField
)
449 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
451 void (JNICALL
*SetObjectField
)
452 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jobject val
);
453 void (JNICALL
*SetBooleanField
)
454 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jboolean val
);
455 void (JNICALL
*SetByteField
)
456 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jbyte val
);
457 void (JNICALL
*SetCharField
)
458 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jchar val
);
459 void (JNICALL
*SetShortField
)
460 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jshort val
);
461 void (JNICALL
*SetIntField
)
462 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jint val
);
463 void (JNICALL
*SetLongField
)
464 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jlong val
);
465 void (JNICALL
*SetFloatField
)
466 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jfloat val
);
467 void (JNICALL
*SetDoubleField
)
468 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jdouble val
);
470 jmethodID (JNICALL
*GetStaticMethodID
)
471 (JNIEnv
*env
, jclass clazz
, const char *name
, const char *sig
);
473 jobject (JNICALL
*CallStaticObjectMethod
)
474 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
475 jobject (JNICALL
*CallStaticObjectMethodV
)
476 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
477 jobject (JNICALL
*CallStaticObjectMethodA
)
478 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
480 jboolean (JNICALL
*CallStaticBooleanMethod
)
481 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
482 jboolean (JNICALL
*CallStaticBooleanMethodV
)
483 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
484 jboolean (JNICALL
*CallStaticBooleanMethodA
)
485 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
487 jbyte (JNICALL
*CallStaticByteMethod
)
488 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
489 jbyte (JNICALL
*CallStaticByteMethodV
)
490 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
491 jbyte (JNICALL
*CallStaticByteMethodA
)
492 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
494 jchar (JNICALL
*CallStaticCharMethod
)
495 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
496 jchar (JNICALL
*CallStaticCharMethodV
)
497 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
498 jchar (JNICALL
*CallStaticCharMethodA
)
499 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
501 jshort (JNICALL
*CallStaticShortMethod
)
502 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
503 jshort (JNICALL
*CallStaticShortMethodV
)
504 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
505 jshort (JNICALL
*CallStaticShortMethodA
)
506 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
508 jint (JNICALL
*CallStaticIntMethod
)
509 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
510 jint (JNICALL
*CallStaticIntMethodV
)
511 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
512 jint (JNICALL
*CallStaticIntMethodA
)
513 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
515 jlong (JNICALL
*CallStaticLongMethod
)
516 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
517 jlong (JNICALL
*CallStaticLongMethodV
)
518 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
519 jlong (JNICALL
*CallStaticLongMethodA
)
520 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
522 jfloat (JNICALL
*CallStaticFloatMethod
)
523 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
524 jfloat (JNICALL
*CallStaticFloatMethodV
)
525 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
526 jfloat (JNICALL
*CallStaticFloatMethodA
)
527 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
529 jdouble (JNICALL
*CallStaticDoubleMethod
)
530 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
531 jdouble (JNICALL
*CallStaticDoubleMethodV
)
532 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
533 jdouble (JNICALL
*CallStaticDoubleMethodA
)
534 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
536 void (JNICALL
*CallStaticVoidMethod
)
537 (JNIEnv
*env
, jclass cls
, jmethodID methodID
, ...);
538 void (JNICALL
*CallStaticVoidMethodV
)
539 (JNIEnv
*env
, jclass cls
, jmethodID methodID
, va_list args
);
540 void (JNICALL
*CallStaticVoidMethodA
)
541 (JNIEnv
*env
, jclass cls
, jmethodID methodID
, jvalue
* args
);
543 jfieldID (JNICALL
*GetStaticFieldID
)
544 (JNIEnv
*env
, jclass clazz
, const char *name
, const char *sig
);
545 jobject (JNICALL
*GetStaticObjectField
)
546 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
547 jboolean (JNICALL
*GetStaticBooleanField
)
548 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
549 jbyte (JNICALL
*GetStaticByteField
)
550 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
551 jchar (JNICALL
*GetStaticCharField
)
552 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
553 jshort (JNICALL
*GetStaticShortField
)
554 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
555 jint (JNICALL
*GetStaticIntField
)
556 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
557 jlong (JNICALL
*GetStaticLongField
)
558 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
559 jfloat (JNICALL
*GetStaticFloatField
)
560 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
561 jdouble (JNICALL
*GetStaticDoubleField
)
562 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
564 void (JNICALL
*SetStaticObjectField
)
565 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jobject value
);
566 void (JNICALL
*SetStaticBooleanField
)
567 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jboolean value
);
568 void (JNICALL
*SetStaticByteField
)
569 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jbyte value
);
570 void (JNICALL
*SetStaticCharField
)
571 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jchar value
);
572 void (JNICALL
*SetStaticShortField
)
573 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jshort value
);
574 void (JNICALL
*SetStaticIntField
)
575 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jint value
);
576 void (JNICALL
*SetStaticLongField
)
577 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jlong value
);
578 void (JNICALL
*SetStaticFloatField
)
579 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jfloat value
);
580 void (JNICALL
*SetStaticDoubleField
)
581 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jdouble value
);
583 jstring (JNICALL
*NewString
)
584 (JNIEnv
*env
, const jchar
*unicode
, jsize len
);
585 jsize (JNICALL
*GetStringLength
)
586 (JNIEnv
*env
, jstring str
);
587 const jchar
*(JNICALL
*GetStringChars
)
588 (JNIEnv
*env
, jstring str
, jboolean
*isCopy
);
589 void (JNICALL
*ReleaseStringChars
)
590 (JNIEnv
*env
, jstring str
, const jchar
*chars
);
592 jstring (JNICALL
*NewStringUTF
)
593 (JNIEnv
*env
, const char *utf
);
594 jsize (JNICALL
*GetStringUTFLength
)
595 (JNIEnv
*env
, jstring str
);
596 const char* (JNICALL
*GetStringUTFChars
)
597 (JNIEnv
*env
, jstring str
, jboolean
*isCopy
);
598 void (JNICALL
*ReleaseStringUTFChars
)
599 (JNIEnv
*env
, jstring str
, const char* chars
);
602 jsize (JNICALL
*GetArrayLength
)
603 (JNIEnv
*env
, jarray array
);
605 jobjectArray (JNICALL
*NewObjectArray
)
606 (JNIEnv
*env
, jsize len
, jclass clazz
, jobject init
);
607 jobject (JNICALL
*GetObjectArrayElement
)
608 (JNIEnv
*env
, jobjectArray array
, jsize index
);
609 void (JNICALL
*SetObjectArrayElement
)
610 (JNIEnv
*env
, jobjectArray array
, jsize index
, jobject val
);
612 jbooleanArray (JNICALL
*NewBooleanArray
)
613 (JNIEnv
*env
, jsize len
);
614 jbyteArray (JNICALL
*NewByteArray
)
615 (JNIEnv
*env
, jsize len
);
616 jcharArray (JNICALL
*NewCharArray
)
617 (JNIEnv
*env
, jsize len
);
618 jshortArray (JNICALL
*NewShortArray
)
619 (JNIEnv
*env
, jsize len
);
620 jintArray (JNICALL
*NewIntArray
)
621 (JNIEnv
*env
, jsize len
);
622 jlongArray (JNICALL
*NewLongArray
)
623 (JNIEnv
*env
, jsize len
);
624 jfloatArray (JNICALL
*NewFloatArray
)
625 (JNIEnv
*env
, jsize len
);
626 jdoubleArray (JNICALL
*NewDoubleArray
)
627 (JNIEnv
*env
, jsize len
);
629 jboolean
* (JNICALL
*GetBooleanArrayElements
)
630 (JNIEnv
*env
, jbooleanArray array
, jboolean
*isCopy
);
631 jbyte
* (JNICALL
*GetByteArrayElements
)
632 (JNIEnv
*env
, jbyteArray array
, jboolean
*isCopy
);
633 jchar
* (JNICALL
*GetCharArrayElements
)
634 (JNIEnv
*env
, jcharArray array
, jboolean
*isCopy
);
635 jshort
* (JNICALL
*GetShortArrayElements
)
636 (JNIEnv
*env
, jshortArray array
, jboolean
*isCopy
);
637 jint
* (JNICALL
*GetIntArrayElements
)
638 (JNIEnv
*env
, jintArray array
, jboolean
*isCopy
);
639 jlong
* (JNICALL
*GetLongArrayElements
)
640 (JNIEnv
*env
, jlongArray array
, jboolean
*isCopy
);
641 jfloat
* (JNICALL
*GetFloatArrayElements
)
642 (JNIEnv
*env
, jfloatArray array
, jboolean
*isCopy
);
643 jdouble
* (JNICALL
*GetDoubleArrayElements
)
644 (JNIEnv
*env
, jdoubleArray array
, jboolean
*isCopy
);
646 void (JNICALL
*ReleaseBooleanArrayElements
)
647 (JNIEnv
*env
, jbooleanArray array
, jboolean
*elems
, jint mode
);
648 void (JNICALL
*ReleaseByteArrayElements
)
649 (JNIEnv
*env
, jbyteArray array
, jbyte
*elems
, jint mode
);
650 void (JNICALL
*ReleaseCharArrayElements
)
651 (JNIEnv
*env
, jcharArray array
, jchar
*elems
, jint mode
);
652 void (JNICALL
*ReleaseShortArrayElements
)
653 (JNIEnv
*env
, jshortArray array
, jshort
*elems
, jint mode
);
654 void (JNICALL
*ReleaseIntArrayElements
)
655 (JNIEnv
*env
, jintArray array
, jint
*elems
, jint mode
);
656 void (JNICALL
*ReleaseLongArrayElements
)
657 (JNIEnv
*env
, jlongArray array
, jlong
*elems
, jint mode
);
658 void (JNICALL
*ReleaseFloatArrayElements
)
659 (JNIEnv
*env
, jfloatArray array
, jfloat
*elems
, jint mode
);
660 void (JNICALL
*ReleaseDoubleArrayElements
)
661 (JNIEnv
*env
, jdoubleArray array
, jdouble
*elems
, jint mode
);
663 void (JNICALL
*GetBooleanArrayRegion
)
664 (JNIEnv
*env
, jbooleanArray array
, jsize start
, jsize l
, jboolean
*buf
);
665 void (JNICALL
*GetByteArrayRegion
)
666 (JNIEnv
*env
, jbyteArray array
, jsize start
, jsize len
, jbyte
*buf
);
667 void (JNICALL
*GetCharArrayRegion
)
668 (JNIEnv
*env
, jcharArray array
, jsize start
, jsize len
, jchar
*buf
);
669 void (JNICALL
*GetShortArrayRegion
)
670 (JNIEnv
*env
, jshortArray array
, jsize start
, jsize len
, jshort
*buf
);
671 void (JNICALL
*GetIntArrayRegion
)
672 (JNIEnv
*env
, jintArray array
, jsize start
, jsize len
, jint
*buf
);
673 void (JNICALL
*GetLongArrayRegion
)
674 (JNIEnv
*env
, jlongArray array
, jsize start
, jsize len
, jlong
*buf
);
675 void (JNICALL
*GetFloatArrayRegion
)
676 (JNIEnv
*env
, jfloatArray array
, jsize start
, jsize len
, jfloat
*buf
);
677 void (JNICALL
*GetDoubleArrayRegion
)
678 (JNIEnv
*env
, jdoubleArray array
, jsize start
, jsize len
, jdouble
*buf
);
680 void (JNICALL
*SetBooleanArrayRegion
)
681 (JNIEnv
*env
, jbooleanArray array
, jsize start
, jsize l
, jboolean
*buf
);
682 void (JNICALL
*SetByteArrayRegion
)
683 (JNIEnv
*env
, jbyteArray array
, jsize start
, jsize len
, jbyte
*buf
);
684 void (JNICALL
*SetCharArrayRegion
)
685 (JNIEnv
*env
, jcharArray array
, jsize start
, jsize len
, jchar
*buf
);
686 void (JNICALL
*SetShortArrayRegion
)
687 (JNIEnv
*env
, jshortArray array
, jsize start
, jsize len
, jshort
*buf
);
688 void (JNICALL
*SetIntArrayRegion
)
689 (JNIEnv
*env
, jintArray array
, jsize start
, jsize len
, jint
*buf
);
690 void (JNICALL
*SetLongArrayRegion
)
691 (JNIEnv
*env
, jlongArray array
, jsize start
, jsize len
, jlong
*buf
);
692 void (JNICALL
*SetFloatArrayRegion
)
693 (JNIEnv
*env
, jfloatArray array
, jsize start
, jsize len
, jfloat
*buf
);
694 void (JNICALL
*SetDoubleArrayRegion
)
695 (JNIEnv
*env
, jdoubleArray array
, jsize start
, jsize len
, jdouble
*buf
);
697 jint (JNICALL
*RegisterNatives
)
698 (JNIEnv
*env
, jclass clazz
, const JNINativeMethod
*methods
,
700 jint (JNICALL
*UnregisterNatives
)
701 (JNIEnv
*env
, jclass clazz
);
703 jint (JNICALL
*MonitorEnter
)
704 (JNIEnv
*env
, jobject obj
);
705 jint (JNICALL
*MonitorExit
)
706 (JNIEnv
*env
, jobject obj
);
708 jint (JNICALL
*GetJavaVM
)
709 (JNIEnv
*env
, JavaVM
**vm
);
713 * We use inlined functions for C++ so that programmers can write:
715 * env->FindClass("java/lang/String")
717 * in C++ rather than:
719 * (*env)->FindClass(env, "java/lang/String")
725 const struct JNINativeInterface_
*functions
;
731 return functions
->GetVersion(this);
733 jclass
DefineClass(const char *name
, jobject loader
, const jbyte
*buf
,
735 return functions
->DefineClass(this, name
, loader
, buf
, len
);
737 jclass
FindClass(const char *name
) {
738 return functions
->FindClass(this, name
);
740 jclass
GetSuperclass(jclass sub
) {
741 return functions
->GetSuperclass(this, sub
);
743 jboolean
IsAssignableFrom(jclass sub
, jclass sup
) {
744 return functions
->IsAssignableFrom(this, sub
, sup
);
747 jint
Throw(jthrowable obj
) {
748 return functions
->Throw(this, obj
);
750 jint
ThrowNew(jclass clazz
, const char *msg
) {
751 return functions
->ThrowNew(this, clazz
, msg
);
753 jthrowable
ExceptionOccurred() {
754 return functions
->ExceptionOccurred(this);
756 void ExceptionDescribe() {
757 functions
->ExceptionDescribe(this);
759 void ExceptionClear() {
760 functions
->ExceptionClear(this);
762 void FatalError(const char *msg
) {
763 functions
->FatalError(this, msg
);
766 jobject
NewGlobalRef(jobject lobj
) {
767 return functions
->NewGlobalRef(this,lobj
);
769 void DeleteGlobalRef(jobject gref
) {
770 functions
->DeleteGlobalRef(this,gref
);
772 void DeleteLocalRef(jobject obj
) {
773 functions
->DeleteLocalRef(this, obj
);
776 jboolean
IsSameObject(jobject obj1
, jobject obj2
) {
777 return functions
->IsSameObject(this,obj1
,obj2
);
780 jobject
AllocObject(jclass clazz
) {
781 return functions
->AllocObject(this,clazz
);
783 jobject
NewObject(jclass clazz
, jmethodID methodID
, ...) {
786 va_start(args
, methodID
);
787 result
= functions
->NewObjectV(this,clazz
,methodID
,args
);
791 jobject
NewObjectV(jclass clazz
, jmethodID methodID
,
793 return functions
->NewObjectV(this,clazz
,methodID
,args
);
795 jobject
NewObjectA(jclass clazz
, jmethodID methodID
,
797 return functions
->NewObjectA(this,clazz
,methodID
,args
);
800 jclass
GetObjectClass(jobject obj
) {
801 return functions
->GetObjectClass(this,obj
);
803 jboolean
IsInstanceOf(jobject obj
, jclass clazz
) {
804 return functions
->IsInstanceOf(this,obj
,clazz
);
807 jmethodID
GetMethodID(jclass clazz
, const char *name
,
809 return functions
->GetMethodID(this,clazz
,name
,sig
);
812 jobject
CallObjectMethod(jobject obj
, jmethodID methodID
, ...) {
815 va_start(args
,methodID
);
816 result
= functions
->CallObjectMethodV(this,obj
,methodID
,args
);
820 jobject
CallObjectMethodV(jobject obj
, jmethodID methodID
,
822 return functions
->CallObjectMethodV(this,obj
,methodID
,args
);
824 jobject
CallObjectMethodA(jobject obj
, jmethodID methodID
,
826 return functions
->CallObjectMethodA(this,obj
,methodID
,args
);
829 jboolean
CallBooleanMethod(jobject obj
,
830 jmethodID methodID
, ...) {
833 va_start(args
,methodID
);
834 result
= functions
->CallBooleanMethodV(this,obj
,methodID
,args
);
838 jboolean
CallBooleanMethodV(jobject obj
, jmethodID methodID
,
840 return functions
->CallBooleanMethodV(this,obj
,methodID
,args
);
842 jboolean
CallBooleanMethodA(jobject obj
, jmethodID methodID
,
844 return functions
->CallBooleanMethodA(this,obj
,methodID
, args
);
847 jbyte
CallByteMethod(jobject obj
, jmethodID methodID
, ...) {
850 va_start(args
,methodID
);
851 result
= functions
->CallByteMethodV(this,obj
,methodID
,args
);
855 jbyte
CallByteMethodV(jobject obj
, jmethodID methodID
,
857 return functions
->CallByteMethodV(this,obj
,methodID
,args
);
859 jbyte
CallByteMethodA(jobject obj
, jmethodID methodID
,
861 return functions
->CallByteMethodA(this,obj
,methodID
,args
);
864 jchar
CallCharMethod(jobject obj
, jmethodID methodID
, ...) {
867 va_start(args
,methodID
);
868 result
= functions
->CallCharMethodV(this,obj
,methodID
,args
);
872 jchar
CallCharMethodV(jobject obj
, jmethodID methodID
,
874 return functions
->CallCharMethodV(this,obj
,methodID
,args
);
876 jchar
CallCharMethodA(jobject obj
, jmethodID methodID
,
878 return functions
->CallCharMethodA(this,obj
,methodID
,args
);
881 jshort
CallShortMethod(jobject obj
, jmethodID methodID
, ...) {
884 va_start(args
,methodID
);
885 result
= functions
->CallShortMethodV(this,obj
,methodID
,args
);
889 jshort
CallShortMethodV(jobject obj
, jmethodID methodID
,
891 return functions
->CallShortMethodV(this,obj
,methodID
,args
);
893 jshort
CallShortMethodA(jobject obj
, jmethodID methodID
,
895 return functions
->CallShortMethodA(this,obj
,methodID
,args
);
898 jint
CallIntMethod(jobject obj
, jmethodID methodID
, ...) {
901 va_start(args
,methodID
);
902 result
= functions
->CallIntMethodV(this,obj
,methodID
,args
);
906 jint
CallIntMethodV(jobject obj
, jmethodID methodID
,
908 return functions
->CallIntMethodV(this,obj
,methodID
,args
);
910 jint
CallIntMethodA(jobject obj
, jmethodID methodID
,
912 return functions
->CallIntMethodA(this,obj
,methodID
,args
);
915 jlong
CallLongMethod(jobject obj
, jmethodID methodID
, ...) {
918 va_start(args
,methodID
);
919 result
= functions
->CallLongMethodV(this,obj
,methodID
,args
);
923 jlong
CallLongMethodV(jobject obj
, jmethodID methodID
,
925 return functions
->CallLongMethodV(this,obj
,methodID
,args
);
927 jlong
CallLongMethodA(jobject obj
, jmethodID methodID
,
929 return functions
->CallLongMethodA(this,obj
,methodID
,args
);
932 jfloat
CallFloatMethod(jobject obj
, jmethodID methodID
, ...) {
935 va_start(args
,methodID
);
936 result
= functions
->CallFloatMethodV(this,obj
,methodID
,args
);
940 jfloat
CallFloatMethodV(jobject obj
, jmethodID methodID
,
942 return functions
->CallFloatMethodV(this,obj
,methodID
,args
);
944 jfloat
CallFloatMethodA(jobject obj
, jmethodID methodID
,
946 return functions
->CallFloatMethodA(this,obj
,methodID
,args
);
949 jdouble
CallDoubleMethod(jobject obj
, jmethodID methodID
, ...) {
952 va_start(args
,methodID
);
953 result
= functions
->CallDoubleMethodV(this,obj
,methodID
,args
);
957 jdouble
CallDoubleMethodV(jobject obj
, jmethodID methodID
,
959 return functions
->CallDoubleMethodV(this,obj
,methodID
,args
);
961 jdouble
CallDoubleMethodA(jobject obj
, jmethodID methodID
,
963 return functions
->CallDoubleMethodA(this,obj
,methodID
,args
);
966 void CallVoidMethod(jobject obj
, jmethodID methodID
, ...) {
968 va_start(args
,methodID
);
969 functions
->CallVoidMethodV(this,obj
,methodID
,args
);
972 void CallVoidMethodV(jobject obj
, jmethodID methodID
,
974 functions
->CallVoidMethodV(this,obj
,methodID
,args
);
976 void CallVoidMethodA(jobject obj
, jmethodID methodID
,
978 functions
->CallVoidMethodA(this,obj
,methodID
,args
);
981 jobject
CallNonvirtualObjectMethod(jobject obj
, jclass clazz
,
982 jmethodID methodID
, ...) {
985 va_start(args
,methodID
);
986 result
= functions
->CallNonvirtualObjectMethodV(this,obj
,clazz
,
991 jobject
CallNonvirtualObjectMethodV(jobject obj
, jclass clazz
,
992 jmethodID methodID
, va_list args
) {
993 return functions
->CallNonvirtualObjectMethodV(this,obj
,clazz
,
996 jobject
CallNonvirtualObjectMethodA(jobject obj
, jclass clazz
,
997 jmethodID methodID
, jvalue
* args
) {
998 return functions
->CallNonvirtualObjectMethodA(this,obj
,clazz
,
1002 jboolean
CallNonvirtualBooleanMethod(jobject obj
, jclass clazz
,
1003 jmethodID methodID
, ...) {
1006 va_start(args
,methodID
);
1007 result
= functions
->CallNonvirtualBooleanMethodV(this,obj
,clazz
,
1012 jboolean
CallNonvirtualBooleanMethodV(jobject obj
, jclass clazz
,
1013 jmethodID methodID
, va_list args
) {
1014 return functions
->CallNonvirtualBooleanMethodV(this,obj
,clazz
,
1017 jboolean
CallNonvirtualBooleanMethodA(jobject obj
, jclass clazz
,
1018 jmethodID methodID
, jvalue
* args
) {
1019 return functions
->CallNonvirtualBooleanMethodA(this,obj
,clazz
,
1023 jbyte
CallNonvirtualByteMethod(jobject obj
, jclass clazz
,
1024 jmethodID methodID
, ...) {
1027 va_start(args
,methodID
);
1028 result
= functions
->CallNonvirtualByteMethodV(this,obj
,clazz
,
1033 jbyte
CallNonvirtualByteMethodV(jobject obj
, jclass clazz
,
1034 jmethodID methodID
, va_list args
) {
1035 return functions
->CallNonvirtualByteMethodV(this,obj
,clazz
,
1038 jbyte
CallNonvirtualByteMethodA(jobject obj
, jclass clazz
,
1039 jmethodID methodID
, jvalue
* args
) {
1040 return functions
->CallNonvirtualByteMethodA(this,obj
,clazz
,
1044 jchar
CallNonvirtualCharMethod(jobject obj
, jclass clazz
,
1045 jmethodID methodID
, ...) {
1048 va_start(args
,methodID
);
1049 result
= functions
->CallNonvirtualCharMethodV(this,obj
,clazz
,
1054 jchar
CallNonvirtualCharMethodV(jobject obj
, jclass clazz
,
1055 jmethodID methodID
, va_list args
) {
1056 return functions
->CallNonvirtualCharMethodV(this,obj
,clazz
,
1059 jchar
CallNonvirtualCharMethodA(jobject obj
, jclass clazz
,
1060 jmethodID methodID
, jvalue
* args
) {
1061 return functions
->CallNonvirtualCharMethodA(this,obj
,clazz
,
1065 jshort
CallNonvirtualShortMethod(jobject obj
, jclass clazz
,
1066 jmethodID methodID
, ...) {
1069 va_start(args
,methodID
);
1070 result
= functions
->CallNonvirtualShortMethodV(this,obj
,clazz
,
1075 jshort
CallNonvirtualShortMethodV(jobject obj
, jclass clazz
,
1076 jmethodID methodID
, va_list args
) {
1077 return functions
->CallNonvirtualShortMethodV(this,obj
,clazz
,
1080 jshort
CallNonvirtualShortMethodA(jobject obj
, jclass clazz
,
1081 jmethodID methodID
, jvalue
* args
) {
1082 return functions
->CallNonvirtualShortMethodA(this,obj
,clazz
,
1086 jint
CallNonvirtualIntMethod(jobject obj
, jclass clazz
,
1087 jmethodID methodID
, ...) {
1090 va_start(args
,methodID
);
1091 result
= functions
->CallNonvirtualIntMethodV(this,obj
,clazz
,
1096 jint
CallNonvirtualIntMethodV(jobject obj
, jclass clazz
,
1097 jmethodID methodID
, va_list args
) {
1098 return functions
->CallNonvirtualIntMethodV(this,obj
,clazz
,
1101 jint
CallNonvirtualIntMethodA(jobject obj
, jclass clazz
,
1102 jmethodID methodID
, jvalue
* args
) {
1103 return functions
->CallNonvirtualIntMethodA(this,obj
,clazz
,
1107 jlong
CallNonvirtualLongMethod(jobject obj
, jclass clazz
,
1108 jmethodID methodID
, ...) {
1111 va_start(args
,methodID
);
1112 result
= functions
->CallNonvirtualLongMethodV(this,obj
,clazz
,
1117 jlong
CallNonvirtualLongMethodV(jobject obj
, jclass clazz
,
1118 jmethodID methodID
, va_list args
) {
1119 return functions
->CallNonvirtualLongMethodV(this,obj
,clazz
,
1122 jlong
CallNonvirtualLongMethodA(jobject obj
, jclass clazz
,
1123 jmethodID methodID
, jvalue
* args
) {
1124 return functions
->CallNonvirtualLongMethodA(this,obj
,clazz
,
1128 jfloat
CallNonvirtualFloatMethod(jobject obj
, jclass clazz
,
1129 jmethodID methodID
, ...) {
1132 va_start(args
,methodID
);
1133 result
= functions
->CallNonvirtualFloatMethodV(this,obj
,clazz
,
1138 jfloat
CallNonvirtualFloatMethodV(jobject obj
, jclass clazz
,
1141 return functions
->CallNonvirtualFloatMethodV(this,obj
,clazz
,
1144 jfloat
CallNonvirtualFloatMethodA(jobject obj
, jclass clazz
,
1147 return functions
->CallNonvirtualFloatMethodA(this,obj
,clazz
,
1151 jdouble
CallNonvirtualDoubleMethod(jobject obj
, jclass clazz
,
1152 jmethodID methodID
, ...) {
1155 va_start(args
,methodID
);
1156 result
= functions
->CallNonvirtualDoubleMethodV(this,obj
,clazz
,
1161 jdouble
CallNonvirtualDoubleMethodV(jobject obj
, jclass clazz
,
1164 return functions
->CallNonvirtualDoubleMethodV(this,obj
,clazz
,
1167 jdouble
CallNonvirtualDoubleMethodA(jobject obj
, jclass clazz
,
1170 return functions
->CallNonvirtualDoubleMethodA(this,obj
,clazz
,
1174 void CallNonvirtualVoidMethod(jobject obj
, jclass clazz
,
1175 jmethodID methodID
, ...) {
1177 va_start(args
,methodID
);
1178 functions
->CallNonvirtualVoidMethodV(this,obj
,clazz
,methodID
,args
);
1181 void CallNonvirtualVoidMethodV(jobject obj
, jclass clazz
,
1184 functions
->CallNonvirtualVoidMethodV(this,obj
,clazz
,methodID
,args
);
1186 void CallNonvirtualVoidMethodA(jobject obj
, jclass clazz
,
1189 functions
->CallNonvirtualVoidMethodA(this,obj
,clazz
,methodID
,args
);
1192 jfieldID
GetFieldID(jclass clazz
, const char *name
,
1194 return functions
->GetFieldID(this,clazz
,name
,sig
);
1197 jobject
GetObjectField(jobject obj
, jfieldID fieldID
) {
1198 return functions
->GetObjectField(this,obj
,fieldID
);
1200 jboolean
GetBooleanField(jobject obj
, jfieldID fieldID
) {
1201 return functions
->GetBooleanField(this,obj
,fieldID
);
1203 jbyte
GetByteField(jobject obj
, jfieldID fieldID
) {
1204 return functions
->GetByteField(this,obj
,fieldID
);
1206 jchar
GetCharField(jobject obj
, jfieldID fieldID
) {
1207 return functions
->GetCharField(this,obj
,fieldID
);
1209 jshort
GetShortField(jobject obj
, jfieldID fieldID
) {
1210 return functions
->GetShortField(this,obj
,fieldID
);
1212 jint
GetIntField(jobject obj
, jfieldID fieldID
) {
1213 return functions
->GetIntField(this,obj
,fieldID
);
1215 jlong
GetLongField(jobject obj
, jfieldID fieldID
) {
1216 return functions
->GetLongField(this,obj
,fieldID
);
1218 jfloat
GetFloatField(jobject obj
, jfieldID fieldID
) {
1219 return functions
->GetFloatField(this,obj
,fieldID
);
1221 jdouble
GetDoubleField(jobject obj
, jfieldID fieldID
) {
1222 return functions
->GetDoubleField(this,obj
,fieldID
);
1225 void SetObjectField(jobject obj
, jfieldID fieldID
, jobject val
) {
1226 functions
->SetObjectField(this,obj
,fieldID
,val
);
1228 void SetBooleanField(jobject obj
, jfieldID fieldID
,
1230 functions
->SetBooleanField(this,obj
,fieldID
,val
);
1232 void SetByteField(jobject obj
, jfieldID fieldID
,
1234 functions
->SetByteField(this,obj
,fieldID
,val
);
1236 void SetCharField(jobject obj
, jfieldID fieldID
,
1238 functions
->SetCharField(this,obj
,fieldID
,val
);
1240 void SetShortField(jobject obj
, jfieldID fieldID
,
1242 functions
->SetShortField(this,obj
,fieldID
,val
);
1244 void SetIntField(jobject obj
, jfieldID fieldID
,
1246 functions
->SetIntField(this,obj
,fieldID
,val
);
1248 void SetLongField(jobject obj
, jfieldID fieldID
,
1250 functions
->SetLongField(this,obj
,fieldID
,val
);
1252 void SetFloatField(jobject obj
, jfieldID fieldID
,
1254 functions
->SetFloatField(this,obj
,fieldID
,val
);
1256 void SetDoubleField(jobject obj
, jfieldID fieldID
,
1258 functions
->SetDoubleField(this,obj
,fieldID
,val
);
1261 jmethodID
GetStaticMethodID(jclass clazz
, const char *name
,
1263 return functions
->GetStaticMethodID(this,clazz
,name
,sig
);
1266 jobject
CallStaticObjectMethod(jclass clazz
, jmethodID methodID
,
1270 va_start(args
,methodID
);
1271 result
= functions
->CallStaticObjectMethodV(this,clazz
,methodID
,args
);
1275 jobject
CallStaticObjectMethodV(jclass clazz
, jmethodID methodID
,
1277 return functions
->CallStaticObjectMethodV(this,clazz
,methodID
,args
);
1279 jobject
CallStaticObjectMethodA(jclass clazz
, jmethodID methodID
,
1281 return functions
->CallStaticObjectMethodA(this,clazz
,methodID
,args
);
1284 jboolean
CallStaticBooleanMethod(jclass clazz
,
1285 jmethodID methodID
, ...) {
1288 va_start(args
,methodID
);
1289 result
= functions
->CallStaticBooleanMethodV(this,clazz
,methodID
,args
);
1293 jboolean
CallStaticBooleanMethodV(jclass clazz
,
1294 jmethodID methodID
, va_list args
) {
1295 return functions
->CallStaticBooleanMethodV(this,clazz
,methodID
,args
);
1297 jboolean
CallStaticBooleanMethodA(jclass clazz
,
1298 jmethodID methodID
, jvalue
*args
) {
1299 return functions
->CallStaticBooleanMethodA(this,clazz
,methodID
,args
);
1302 jbyte
CallStaticByteMethod(jclass clazz
,
1303 jmethodID methodID
, ...) {
1306 va_start(args
,methodID
);
1307 result
= functions
->CallStaticByteMethodV(this,clazz
,methodID
,args
);
1311 jbyte
CallStaticByteMethodV(jclass clazz
,
1312 jmethodID methodID
, va_list args
) {
1313 return functions
->CallStaticByteMethodV(this,clazz
,methodID
,args
);
1315 jbyte
CallStaticByteMethodA(jclass clazz
,
1316 jmethodID methodID
, jvalue
*args
) {
1317 return functions
->CallStaticByteMethodA(this,clazz
,methodID
,args
);
1320 jchar
CallStaticCharMethod(jclass clazz
,
1321 jmethodID methodID
, ...) {
1324 va_start(args
,methodID
);
1325 result
= functions
->CallStaticCharMethodV(this,clazz
,methodID
,args
);
1329 jchar
CallStaticCharMethodV(jclass clazz
,
1330 jmethodID methodID
, va_list args
) {
1331 return functions
->CallStaticCharMethodV(this,clazz
,methodID
,args
);
1333 jchar
CallStaticCharMethodA(jclass clazz
,
1334 jmethodID methodID
, jvalue
*args
) {
1335 return functions
->CallStaticCharMethodA(this,clazz
,methodID
,args
);
1338 jshort
CallStaticShortMethod(jclass clazz
,
1339 jmethodID methodID
, ...) {
1342 va_start(args
,methodID
);
1343 result
= functions
->CallStaticShortMethodV(this,clazz
,methodID
,args
);
1347 jshort
CallStaticShortMethodV(jclass clazz
,
1348 jmethodID methodID
, va_list args
) {
1349 return functions
->CallStaticShortMethodV(this,clazz
,methodID
,args
);
1351 jshort
CallStaticShortMethodA(jclass clazz
,
1352 jmethodID methodID
, jvalue
*args
) {
1353 return functions
->CallStaticShortMethodA(this,clazz
,methodID
,args
);
1356 jint
CallStaticIntMethod(jclass clazz
,
1357 jmethodID methodID
, ...) {
1360 va_start(args
,methodID
);
1361 result
= functions
->CallStaticIntMethodV(this,clazz
,methodID
,args
);
1365 jint
CallStaticIntMethodV(jclass clazz
,
1366 jmethodID methodID
, va_list args
) {
1367 return functions
->CallStaticIntMethodV(this,clazz
,methodID
,args
);
1369 jint
CallStaticIntMethodA(jclass clazz
,
1370 jmethodID methodID
, jvalue
*args
) {
1371 return functions
->CallStaticIntMethodA(this,clazz
,methodID
,args
);
1374 jlong
CallStaticLongMethod(jclass clazz
,
1375 jmethodID methodID
, ...) {
1378 va_start(args
,methodID
);
1379 result
= functions
->CallStaticLongMethodV(this,clazz
,methodID
,args
);
1383 jlong
CallStaticLongMethodV(jclass clazz
,
1384 jmethodID methodID
, va_list args
) {
1385 return functions
->CallStaticLongMethodV(this,clazz
,methodID
,args
);
1387 jlong
CallStaticLongMethodA(jclass clazz
,
1388 jmethodID methodID
, jvalue
*args
) {
1389 return functions
->CallStaticLongMethodA(this,clazz
,methodID
,args
);
1392 jfloat
CallStaticFloatMethod(jclass clazz
,
1393 jmethodID methodID
, ...) {
1396 va_start(args
,methodID
);
1397 result
= functions
->CallStaticFloatMethodV(this,clazz
,methodID
,args
);
1401 jfloat
CallStaticFloatMethodV(jclass clazz
,
1402 jmethodID methodID
, va_list args
) {
1403 return functions
->CallStaticFloatMethodV(this,clazz
,methodID
,args
);
1405 jfloat
CallStaticFloatMethodA(jclass clazz
,
1406 jmethodID methodID
, jvalue
*args
) {
1407 return functions
->CallStaticFloatMethodA(this,clazz
,methodID
,args
);
1410 jdouble
CallStaticDoubleMethod(jclass clazz
,
1411 jmethodID methodID
, ...) {
1414 va_start(args
,methodID
);
1415 result
= functions
->CallStaticDoubleMethodV(this,clazz
,methodID
,args
);
1419 jdouble
CallStaticDoubleMethodV(jclass clazz
,
1420 jmethodID methodID
, va_list args
) {
1421 return functions
->CallStaticDoubleMethodV(this,clazz
,methodID
,args
);
1423 jdouble
CallStaticDoubleMethodA(jclass clazz
,
1424 jmethodID methodID
, jvalue
*args
) {
1425 return functions
->CallStaticDoubleMethodA(this,clazz
,methodID
,args
);
1428 void CallStaticVoidMethod(jclass cls
, jmethodID methodID
, ...) {
1430 va_start(args
,methodID
);
1431 functions
->CallStaticVoidMethodV(this,cls
,methodID
,args
);
1434 void CallStaticVoidMethodV(jclass cls
, jmethodID methodID
,
1436 functions
->CallStaticVoidMethodV(this,cls
,methodID
,args
);
1438 void CallStaticVoidMethodA(jclass cls
, jmethodID methodID
,
1440 functions
->CallStaticVoidMethodA(this,cls
,methodID
,args
);
1443 jfieldID
GetStaticFieldID(jclass clazz
, const char *name
,
1445 return functions
->GetStaticFieldID(this,clazz
,name
,sig
);
1447 jobject
GetStaticObjectField(jclass clazz
, jfieldID fieldID
) {
1448 return functions
->GetStaticObjectField(this,clazz
,fieldID
);
1450 jboolean
GetStaticBooleanField(jclass clazz
, jfieldID fieldID
) {
1451 return functions
->GetStaticBooleanField(this,clazz
,fieldID
);
1453 jbyte
GetStaticByteField(jclass clazz
, jfieldID fieldID
) {
1454 return functions
->GetStaticByteField(this,clazz
,fieldID
);
1456 jchar
GetStaticCharField(jclass clazz
, jfieldID fieldID
) {
1457 return functions
->GetStaticCharField(this,clazz
,fieldID
);
1459 jshort
GetStaticShortField(jclass clazz
, jfieldID fieldID
) {
1460 return functions
->GetStaticShortField(this,clazz
,fieldID
);
1462 jint
GetStaticIntField(jclass clazz
, jfieldID fieldID
) {
1463 return functions
->GetStaticIntField(this,clazz
,fieldID
);
1465 jlong
GetStaticLongField(jclass clazz
, jfieldID fieldID
) {
1466 return functions
->GetStaticLongField(this,clazz
,fieldID
);
1468 jfloat
GetStaticFloatField(jclass clazz
, jfieldID fieldID
) {
1469 return functions
->GetStaticFloatField(this,clazz
,fieldID
);
1471 jdouble
GetStaticDoubleField(jclass clazz
, jfieldID fieldID
) {
1472 return functions
->GetStaticDoubleField(this,clazz
,fieldID
);
1475 void SetStaticObjectField(jclass clazz
, jfieldID fieldID
,
1477 functions
->SetStaticObjectField(this,clazz
,fieldID
,value
);
1479 void SetStaticBooleanField(jclass clazz
, jfieldID fieldID
,
1481 functions
->SetStaticBooleanField(this,clazz
,fieldID
,value
);
1483 void SetStaticByteField(jclass clazz
, jfieldID fieldID
,
1485 functions
->SetStaticByteField(this,clazz
,fieldID
,value
);
1487 void SetStaticCharField(jclass clazz
, jfieldID fieldID
,
1489 functions
->SetStaticCharField(this,clazz
,fieldID
,value
);
1491 void SetStaticShortField(jclass clazz
, jfieldID fieldID
,
1493 functions
->SetStaticShortField(this,clazz
,fieldID
,value
);
1495 void SetStaticIntField(jclass clazz
, jfieldID fieldID
,
1497 functions
->SetStaticIntField(this,clazz
,fieldID
,value
);
1499 void SetStaticLongField(jclass clazz
, jfieldID fieldID
,
1501 functions
->SetStaticLongField(this,clazz
,fieldID
,value
);
1503 void SetStaticFloatField(jclass clazz
, jfieldID fieldID
,
1505 functions
->SetStaticFloatField(this,clazz
,fieldID
,value
);
1507 void SetStaticDoubleField(jclass clazz
, jfieldID fieldID
,
1509 functions
->SetStaticDoubleField(this,clazz
,fieldID
,value
);
1512 jstring
NewString(const jchar
*unicode
, jsize len
) {
1513 return functions
->NewString(this,unicode
,len
);
1515 jsize
GetStringLength(jstring str
) {
1516 return functions
->GetStringLength(this,str
);
1518 const jchar
*GetStringChars(jstring str
, jboolean
*isCopy
) {
1519 return functions
->GetStringChars(this,str
,isCopy
);
1521 void ReleaseStringChars(jstring str
, const jchar
*chars
) {
1522 functions
->ReleaseStringChars(this,str
,chars
);
1525 jstring
NewStringUTF(const char *utf
) {
1526 return functions
->NewStringUTF(this,utf
);
1528 jsize
GetStringUTFLength(jstring str
) {
1529 return functions
->GetStringUTFLength(this,str
);
1531 const char* GetStringUTFChars(jstring str
, jboolean
*isCopy
) {
1532 return functions
->GetStringUTFChars(this,str
,isCopy
);
1534 void ReleaseStringUTFChars(jstring str
, const char* chars
) {
1535 functions
->ReleaseStringUTFChars(this,str
,chars
);
1538 jsize
GetArrayLength(jarray array
) {
1539 return functions
->GetArrayLength(this,array
);
1542 jobjectArray
NewObjectArray(jsize len
, jclass clazz
,
1544 return functions
->NewObjectArray(this,len
,clazz
,init
);
1546 jobject
GetObjectArrayElement(jobjectArray array
, jsize index
) {
1547 return functions
->GetObjectArrayElement(this,array
,index
);
1549 void SetObjectArrayElement(jobjectArray array
, jsize index
,
1551 functions
->SetObjectArrayElement(this,array
,index
,val
);
1554 jbooleanArray
NewBooleanArray(jsize len
) {
1555 return functions
->NewBooleanArray(this,len
);
1557 jbyteArray
NewByteArray(jsize len
) {
1558 return functions
->NewByteArray(this,len
);
1560 jcharArray
NewCharArray(jsize len
) {
1561 return functions
->NewCharArray(this,len
);
1563 jshortArray
NewShortArray(jsize len
) {
1564 return functions
->NewShortArray(this,len
);
1566 jintArray
NewIntArray(jsize len
) {
1567 return functions
->NewIntArray(this,len
);
1569 jlongArray
NewLongArray(jsize len
) {
1570 return functions
->NewLongArray(this,len
);
1572 jfloatArray
NewFloatArray(jsize len
) {
1573 return functions
->NewFloatArray(this,len
);
1575 jdoubleArray
NewDoubleArray(jsize len
) {
1576 return functions
->NewDoubleArray(this,len
);
1579 jboolean
* GetBooleanArrayElements(jbooleanArray array
, jboolean
*isCopy
) {
1580 return functions
->GetBooleanArrayElements(this,array
,isCopy
);
1582 jbyte
* GetByteArrayElements(jbyteArray array
, jboolean
*isCopy
) {
1583 return functions
->GetByteArrayElements(this,array
,isCopy
);
1585 jchar
* GetCharArrayElements(jcharArray array
, jboolean
*isCopy
) {
1586 return functions
->GetCharArrayElements(this,array
,isCopy
);
1588 jshort
* GetShortArrayElements(jshortArray array
, jboolean
*isCopy
) {
1589 return functions
->GetShortArrayElements(this,array
,isCopy
);
1591 jint
* GetIntArrayElements(jintArray array
, jboolean
*isCopy
) {
1592 return functions
->GetIntArrayElements(this,array
,isCopy
);
1594 jlong
* GetLongArrayElements(jlongArray array
, jboolean
*isCopy
) {
1595 return functions
->GetLongArrayElements(this,array
,isCopy
);
1597 jfloat
* GetFloatArrayElements(jfloatArray array
, jboolean
*isCopy
) {
1598 return functions
->GetFloatArrayElements(this,array
,isCopy
);
1600 jdouble
* GetDoubleArrayElements(jdoubleArray array
, jboolean
*isCopy
) {
1601 return functions
->GetDoubleArrayElements(this,array
,isCopy
);
1604 void ReleaseBooleanArrayElements(jbooleanArray array
,
1607 functions
->ReleaseBooleanArrayElements(this,array
,elems
,mode
);
1609 void ReleaseByteArrayElements(jbyteArray array
,
1612 functions
->ReleaseByteArrayElements(this,array
,elems
,mode
);
1614 void ReleaseCharArrayElements(jcharArray array
,
1617 functions
->ReleaseCharArrayElements(this,array
,elems
,mode
);
1619 void ReleaseShortArrayElements(jshortArray array
,
1622 functions
->ReleaseShortArrayElements(this,array
,elems
,mode
);
1624 void ReleaseIntArrayElements(jintArray array
,
1627 functions
->ReleaseIntArrayElements(this,array
,elems
,mode
);
1629 void ReleaseLongArrayElements(jlongArray array
,
1632 functions
->ReleaseLongArrayElements(this,array
,elems
,mode
);
1634 void ReleaseFloatArrayElements(jfloatArray array
,
1637 functions
->ReleaseFloatArrayElements(this,array
,elems
,mode
);
1639 void ReleaseDoubleArrayElements(jdoubleArray array
,
1642 functions
->ReleaseDoubleArrayElements(this,array
,elems
,mode
);
1645 void GetBooleanArrayRegion(jbooleanArray array
,
1646 jsize start
, jsize len
, jboolean
*buf
) {
1647 functions
->GetBooleanArrayRegion(this,array
,start
,len
,buf
);
1649 void GetByteArrayRegion(jbyteArray array
,
1650 jsize start
, jsize len
, jbyte
*buf
) {
1651 functions
->GetByteArrayRegion(this,array
,start
,len
,buf
);
1653 void GetCharArrayRegion(jcharArray array
,
1654 jsize start
, jsize len
, jchar
*buf
) {
1655 functions
->GetCharArrayRegion(this,array
,start
,len
,buf
);
1657 void GetShortArrayRegion(jshortArray array
,
1658 jsize start
, jsize len
, jshort
*buf
) {
1659 functions
->GetShortArrayRegion(this,array
,start
,len
,buf
);
1661 void GetIntArrayRegion(jintArray array
,
1662 jsize start
, jsize len
, jint
*buf
) {
1663 functions
->GetIntArrayRegion(this,array
,start
,len
,buf
);
1665 void GetLongArrayRegion(jlongArray array
,
1666 jsize start
, jsize len
, jlong
*buf
) {
1667 functions
->GetLongArrayRegion(this,array
,start
,len
,buf
);
1669 void GetFloatArrayRegion(jfloatArray array
,
1670 jsize start
, jsize len
, jfloat
*buf
) {
1671 functions
->GetFloatArrayRegion(this,array
,start
,len
,buf
);
1673 void GetDoubleArrayRegion(jdoubleArray array
,
1674 jsize start
, jsize len
, jdouble
*buf
) {
1675 functions
->GetDoubleArrayRegion(this,array
,start
,len
,buf
);
1678 void SetBooleanArrayRegion(jbooleanArray array
, jsize start
, jsize len
,
1680 functions
->SetBooleanArrayRegion(this,array
,start
,len
,buf
);
1682 void SetByteArrayRegion(jbyteArray array
, jsize start
, jsize len
,
1684 functions
->SetByteArrayRegion(this,array
,start
,len
,buf
);
1686 void SetCharArrayRegion(jcharArray array
, jsize start
, jsize len
,
1688 functions
->SetCharArrayRegion(this,array
,start
,len
,buf
);
1690 void SetShortArrayRegion(jshortArray array
, jsize start
, jsize len
,
1692 functions
->SetShortArrayRegion(this,array
,start
,len
,buf
);
1694 void SetIntArrayRegion(jintArray array
, jsize start
, jsize len
,
1696 functions
->SetIntArrayRegion(this,array
,start
,len
,buf
);
1698 void SetLongArrayRegion(jlongArray array
, jsize start
, jsize len
,
1700 functions
->SetLongArrayRegion(this,array
,start
,len
,buf
);
1702 void SetFloatArrayRegion(jfloatArray array
, jsize start
, jsize len
,
1704 functions
->SetFloatArrayRegion(this,array
,start
,len
,buf
);
1706 void SetDoubleArrayRegion(jdoubleArray array
, jsize start
, jsize len
,
1708 functions
->SetDoubleArrayRegion(this,array
,start
,len
,buf
);
1711 jint
RegisterNatives(jclass clazz
, const JNINativeMethod
*methods
,
1713 return functions
->RegisterNatives(this,clazz
,methods
,nMethods
);
1715 jint
UnregisterNatives(jclass clazz
) {
1716 return functions
->UnregisterNatives(this,clazz
);
1719 jint
MonitorEnter(jobject obj
) {
1720 return functions
->MonitorEnter(this,obj
);
1722 jint
MonitorExit(jobject obj
) {
1723 return functions
->MonitorExit(this,obj
);
1726 jint
GetJavaVM(JavaVM
**vm
) {
1727 return functions
->GetJavaVM(this,vm
);
1730 #endif /* __cplusplus */
1733 /* These structures will be VM-specific. */
1735 typedef struct JDK1_1InitArgs
{
1740 jint nativeStackSize
;
1747 jint (JNICALL
*vfprintf
)(FILE *fp
, const char *format
, va_list args
);
1748 void (JNICALL
*exit
)(jint code
);
1749 void (JNICALL
*abort
)();
1752 jint enableVerboseGC
;
1753 jint disableAsyncGC
;
1759 typedef struct JDK1_1AttachArgs
{
1760 void * __padding
; /* C compilers don't allow empty structures. */
1763 /* End VM-specific. */
1765 struct JNIInvokeInterface_
{
1770 jint (JNICALL
*DestroyJavaVM
)(JavaVM
*vm
);
1772 jint (JNICALL
*AttachCurrentThread
)
1773 (JavaVM
*vm
, JNIEnv
**penv
, void *args
);
1775 jint (JNICALL
*DetachCurrentThread
)(JavaVM
*vm
);
1779 const struct JNIInvokeInterface_
*functions
;
1785 jint
DestroyJavaVM() {
1786 return functions
->DestroyJavaVM(this);
1788 jint
AttachCurrentThread(JNIEnv
**penv
, void *args
) {
1789 return functions
->AttachCurrentThread(this, penv
, args
);
1791 jint
DetachCurrentThread() {
1792 return functions
->DetachCurrentThread(this);
1798 JNI_PUBLIC_API(void) JNI_GetDefaultJavaVMInitArgs(void *);
1800 JNI_PUBLIC_API(jint
) JNI_CreateJavaVM(JavaVM
**, JNIEnv
**, void *);
1802 JNI_PUBLIC_API(jint
) JNI_GetCreatedJavaVMs(JavaVM
**, jsize
, jsize
*);
1803 JNI_PUBLIC_API(jref
) JNI_MakeLocalRef(JNIEnv
*pJNIEnv
, void *pHObject
);
1807 #endif /* __cplusplus */