1 /* Copyright (C) 1998, 1999, 2000 Free Software Foundation
3 This file is part of libgcj.
5 This software is copyrighted work licensed under the terms of the
6 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 /* Note: this file must be compilable by the C compiler (for now,
10 assuming GNU C is ok). This means you must never use `//'
11 comments, and all C++-specific code must be conditional on
18 #define _Jv_va_list va_list
22 /* This is wrong, because it pollutes the name-space too much! */
23 #include <gcj/javaprims.h>
24 #include <gcj/array.h>
26 typedef struct _Jv_JNIEnv JNIEnv
;
27 typedef struct _Jv_JavaVM JavaVM
;
30 #define JNI_FALSE false
32 #else /* __cplusplus */
34 typedef int jbyte
__attribute__((__mode__(__QI__
)));
35 typedef int jshort
__attribute__((__mode__(__HI__
)));
36 typedef int jint
__attribute__((__mode__(__SI__
)));
37 typedef int jlong
__attribute__((__mode__(__DI__
)));
38 typedef int jboolean
__attribute__((__mode__(__QI__
)));
39 typedef unsigned short jchar
__attribute__((__mode__(__HI__
)));
41 typedef double jdouble
;
44 typedef void *jobject
;
45 typedef jobject jclass
;
46 typedef jobject jstring
;
47 typedef jobject jarray
;
48 typedef jobject jthrowable
;
49 typedef jobject jobjectArray
;
50 typedef jobject jbyteArray
;
51 typedef jobject jshortArray
;
52 typedef jobject jintArray
;
53 typedef jobject jlongArray
;
54 typedef jobject jbooleanArray
;
55 typedef jobject jcharArray
;
56 typedef jobject jfloatArray
;
57 typedef jobject jdoubleArray
;
60 typedef void *jfieldID
;
61 typedef void *jmethodID
;
63 typedef const struct JNINativeInterface
*JNIEnv
;
64 typedef const struct JNIInvokeInterface
*JavaVM
;
69 #endif /* __cplusplus */
71 /* FIXME: this is wrong. */
72 typedef jobject jweak
;
74 /* Version numbers. */
75 #define JNI_VERSION_1_1 0x00010001
76 #define JNI_VERSION_1_2 0x00010002
78 /* Used when releasing array elements. */
85 #define JNI_EDETACHED -2
86 #define JNI_EVERSION -3
91 #endif /* __cplusplus */
93 /* These functions might be defined in libraries which we load; the
94 JNI implementation calls them at the appropriate times. */
95 extern jint
JNI_OnLoad (JavaVM
*, void *);
96 extern void JNI_OnUnload (JavaVM
*, void *);
98 /* These functions are called by user code to start using the
100 extern jint
JNI_GetDefaultJavaVMInitArgs (void *);
101 extern jint
JNI_CreateJavaVM (JavaVM
**, void **, void *);
102 extern jint
JNI_GetCreatedJavaVMs(JavaVM
**, jsize
, jsize
*);
106 #endif /* __cplusplus */
122 typedef void * (*_Jv_func
) (...);
124 typedef void * (*_Jv_func
) ();
127 /* This structure is used when registering native methods. */
132 void *fnPtr
; /* Sigh. */
135 struct JNINativeInterface
142 jint (*GetVersion
) (JNIEnv
*);
143 jclass (*DefineClass
) (JNIEnv
*, jobject
,
144 const jbyte
*, jsize
);
145 jclass (*FindClass
) (JNIEnv
*, const char *);
147 jmethodID (*FromReflectedMethod
) (JNIEnv
*, jobject
);
148 jfieldID (*FromReflectedField
) (JNIEnv
*, jobject
);
149 jobject (*ToReflectedMethod
) (JNIEnv
*, jclass
, jmethodID
,
152 jclass (*GetSuperclass
) (JNIEnv
*, jclass
);
153 jboolean (*IsAssignableFrom
) (JNIEnv
*, jclass
, jclass
);
155 jobject (*ToReflectedField
) (JNIEnv
*, jclass
, jfieldID
,
158 jint (*Throw
) (JNIEnv
*, jthrowable
);
159 jint (*ThrowNew
) (JNIEnv
*, jclass
, const char *);
160 jthrowable (*ExceptionOccurred
) (JNIEnv
*);
161 void (*ExceptionDescribe
) (JNIEnv
*);
162 void (*ExceptionClear
) (JNIEnv
*);
163 void (*FatalError
) (JNIEnv
*, const char *);
165 jint (*PushLocalFrame
) (JNIEnv
*, jint
);
166 jobject (*PopLocalFrame
) (JNIEnv
*, jobject
);
168 jobject (*NewGlobalRef
) (JNIEnv
*, jobject
);
169 void (*DeleteGlobalRef
) (JNIEnv
*, jobject
);
170 void (*DeleteLocalRef
) (JNIEnv
*, jobject
);;
171 jboolean (*IsSameObject
) (JNIEnv
*, jobject
, jobject
);
173 jobject (*NewLocalRef
) (JNIEnv
*, jobject
);
174 jint (*EnsureLocalCapacity
) (JNIEnv
*, jint
);
176 jobject (*AllocObject
) (JNIEnv
*, jclass
);
177 jobject (*NewObject
) (JNIEnv
*, jclass
, jmethodID
, ...);
178 jobject (*NewObjectV
) (JNIEnv
*, jclass
, jmethodID
,
180 jobject (*NewObjectA
) (JNIEnv
*, jclass
, jmethodID
,
183 jclass (*GetObjectClass
) (JNIEnv
*, jobject
);
184 jboolean (*IsInstanceOf
) (JNIEnv
*, jobject
, jclass
);
185 jmethodID (*GetMethodID
) (JNIEnv
*, jclass
, const char *,
188 jobject (*CallObjectMethod
) (JNIEnv
*, jobject
, jmethodID
,
190 jobject (*CallObjectMethodV
) (JNIEnv
*, jobject
, jmethodID
,
192 jobject (*CallObjectMethodA
) (JNIEnv
*, jobject
, jmethodID
,
194 jboolean (*CallBooleanMethod
) (JNIEnv
*, jobject
, jmethodID
,
196 jboolean (*CallBooleanMethodV
) (JNIEnv
*, jobject
, jmethodID
,
198 jboolean (*CallBooleanMethodA
) (JNIEnv
*, jobject
, jmethodID
,
200 jbyte (*CallByteMethod
) (JNIEnv
*, jobject
, jmethodID
,
202 jbyte (*CallByteMethodV
) (JNIEnv
*, jobject
, jmethodID
,
204 jbyte (*CallByteMethodA
) (JNIEnv
*, jobject
, jmethodID
,
206 jchar (*CallCharMethod
) (JNIEnv
*, jobject
, jmethodID
,
208 jchar (*CallCharMethodV
) (JNIEnv
*, jobject
, jmethodID
,
210 jchar (*CallCharMethodA
) (JNIEnv
*, jobject
, jmethodID
,
212 jshort (*CallShortMethod
) (JNIEnv
*, jobject
, jmethodID
,
214 jshort (*CallShortMethodV
) (JNIEnv
*, jobject
, jmethodID
,
216 jshort (*CallShortMethodA
) (JNIEnv
*, jobject
, jmethodID
,
218 jint (*CallIntMethod
) (JNIEnv
*, jobject
, jmethodID
,
220 jint (*CallIntMethodV
) (JNIEnv
*, jobject
, jmethodID
,
222 jint (*CallIntMethodA
) (JNIEnv
*, jobject
, jmethodID
,
224 jlong (*CallLongMethod
) (JNIEnv
*, jobject
, jmethodID
,
226 jlong (*CallLongMethodV
) (JNIEnv
*, jobject
, jmethodID
,
228 jlong (*CallLongMethodA
) (JNIEnv
*, jobject
, jmethodID
,
230 jfloat (*CallFloatMethod
) (JNIEnv
*, jobject
, jmethodID
,
232 jfloat (*CallFloatMethodV
) (JNIEnv
*, jobject
, jmethodID
,
234 jfloat (*CallFloatMethodA
) (JNIEnv
*, jobject
, jmethodID
,
236 jdouble (*CallDoubleMethod
) (JNIEnv
*, jobject
, jmethodID
,
238 jdouble (*CallDoubleMethodV
) (JNIEnv
*, jobject
, jmethodID
,
240 jdouble (*CallDoubleMethodA
) (JNIEnv
*, jobject
, jmethodID
,
242 void (*CallVoidMethod
) (JNIEnv
*, jobject
, jmethodID
,
244 void (*CallVoidMethodV
) (JNIEnv
*, jobject
, jmethodID
,
246 void (*CallVoidMethodA
) (JNIEnv
*, jobject
, jmethodID
,
249 jobject (*CallNonvirtualObjectMethod
) (JNIEnv
*, jobject
, jclass
,
251 jobject (*CallNonvirtualObjectMethodV
) (JNIEnv
*, jobject
, jclass
,
252 jmethodID
, _Jv_va_list
);
253 jobject (*CallNonvirtualObjectMethodA
) (JNIEnv
*, jobject
, jclass
,
254 jmethodID
, jvalue
*);
255 jboolean (*CallNonvirtualBooleanMethod
) (JNIEnv
*, jobject
, jclass
,
257 jboolean (*CallNonvirtualBooleanMethodV
) (JNIEnv
*, jobject
, jclass
,
258 jmethodID
, _Jv_va_list
);
259 jboolean (*CallNonvirtualBooleanMethodA
) (JNIEnv
*, jobject
, jclass
,
260 jmethodID
, jvalue
*);
261 jbyte (*CallNonvirtualByteMethod
) (JNIEnv
*, jobject
, jclass
,
263 jbyte (*CallNonvirtualByteMethodV
) (JNIEnv
*, jobject
, jclass
,
264 jmethodID
, _Jv_va_list
);
265 jbyte (*CallNonvirtualByteMethodA
) (JNIEnv
*, jobject
, jclass
,
266 jmethodID
, jvalue
*);
267 jchar (*CallNonvirtualCharMethod
) (JNIEnv
*, jobject
, jclass
,
269 jchar (*CallNonvirtualCharMethodV
) (JNIEnv
*, jobject
, jclass
,
270 jmethodID
, _Jv_va_list
);
271 jchar (*CallNonvirtualCharMethodA
) (JNIEnv
*, jobject
, jclass
,
272 jmethodID
, jvalue
*);
273 jshort (*CallNonvirtualShortMethod
) (JNIEnv
*, jobject
, jclass
,
275 jshort (*CallNonvirtualShortMethodV
) (JNIEnv
*, jobject
, jclass
,
276 jmethodID
, _Jv_va_list
);
277 jshort (*CallNonvirtualShortMethodA
) (JNIEnv
*, jobject
, jclass
,
278 jmethodID
, jvalue
*);
279 jint (*CallNonvirtualIntMethod
) (JNIEnv
*, jobject
, jclass
,
281 jint (*CallNonvirtualIntMethodV
) (JNIEnv
*, jobject
, jclass
,
282 jmethodID
, _Jv_va_list
);
283 jint (*CallNonvirtualIntMethodA
) (JNIEnv
*, jobject
, jclass
,
284 jmethodID
, jvalue
*);
285 jlong (*CallNonvirtualLongMethod
) (JNIEnv
*, jobject
, jclass
,
287 jlong (*CallNonvirtualLongMethodV
) (JNIEnv
*, jobject
, jclass
,
288 jmethodID
, _Jv_va_list
);
289 jlong (*CallNonvirtualLongMethodA
) (JNIEnv
*, jobject
, jclass
,
290 jmethodID
, jvalue
*);
291 jfloat (*CallNonvirtualFloatMethod
) (JNIEnv
*, jobject
, jclass
,
293 jfloat (*CallNonvirtualFloatMethodV
) (JNIEnv
*, jobject
, jclass
,
294 jmethodID
, _Jv_va_list
);
295 jfloat (*CallNonvirtualFloatMethodA
) (JNIEnv
*, jobject
, jclass
,
296 jmethodID
, jvalue
*);
297 jdouble (*CallNonvirtualDoubleMethod
) (JNIEnv
*, jobject
, jclass
,
299 jdouble (*CallNonvirtualDoubleMethodV
) (JNIEnv
*, jobject
, jclass
,
300 jmethodID
, _Jv_va_list
);
301 jdouble (*CallNonvirtualDoubleMethodA
) (JNIEnv
*, jobject
, jclass
,
302 jmethodID
, jvalue
*);
303 void (*CallNonvirtualVoidMethod
) (JNIEnv
*, jobject
, jclass
,
305 void (*CallNonvirtualVoidMethodV
) (JNIEnv
*, jobject
, jclass
,
306 jmethodID
, _Jv_va_list
);
307 void (*CallNonvirtualVoidMethodA
) (JNIEnv
*, jobject
, jclass
,
308 jmethodID
, jvalue
*);
310 jfieldID (*GetFieldID
) (JNIEnv
*, jclass
, const char *,
313 jobject (*GetObjectField
) (JNIEnv
*, jobject
, jfieldID
);
314 jboolean (*GetBooleanField
) (JNIEnv
*, jobject
, jfieldID
);
315 jbyte (*GetByteField
) (JNIEnv
*, jobject
, jfieldID
);
316 jchar (*GetCharField
) (JNIEnv
*, jobject
, jfieldID
);
317 jshort (*GetShortField
) (JNIEnv
*, jobject
, jfieldID
);
318 jint (*GetIntField
) (JNIEnv
*, jobject
, jfieldID
);
319 jlong (*GetLongField
) (JNIEnv
*, jobject
, jfieldID
);
320 jfloat (*GetFloatField
) (JNIEnv
*, jobject
, jfieldID
);
321 jdouble (*GetDoubleField
) (JNIEnv
*, jobject
, jfieldID
);
323 void (*SetObjectField
) (JNIEnv
*, jobject
,
325 void (*SetBooleanField
) (JNIEnv
*, jobject
,
327 void (*SetByteField
) (JNIEnv
*, jobject
,
329 void (*SetCharField
) (JNIEnv
*, jobject
,
331 void (*SetShortField
) (JNIEnv
*, jobject
,
333 void (*SetIntField
) (JNIEnv
*, jobject
,
335 void (*SetLongField
) (JNIEnv
*, jobject
,
337 void (*SetFloatField
) (JNIEnv
*, jobject
,
339 void (*SetDoubleField
) (JNIEnv
*, jobject
,
342 jmethodID (*GetStaticMethodID
) (JNIEnv
*, jclass
, const char *,
345 jobject (*CallStaticObjectMethod
) (JNIEnv
*, jclass
, jmethodID
,
347 jobject (*CallStaticObjectMethodV
) (JNIEnv
*, jclass
, jmethodID
,
349 jobject (*CallStaticObjectMethodA
) (JNIEnv
*, jclass
, jmethodID
,
351 jboolean (*CallStaticBooleanMethod
) (JNIEnv
*, jclass
, jmethodID
,
353 jboolean (*CallStaticBooleanMethodV
) (JNIEnv
*, jclass
, jmethodID
,
355 jboolean (*CallStaticBooleanMethodA
) (JNIEnv
*, jclass
, jmethodID
,
357 jbyte (*CallStaticByteMethod
) (JNIEnv
*, jclass
, jmethodID
,
359 jbyte (*CallStaticByteMethodV
) (JNIEnv
*, jclass
, jmethodID
,
361 jbyte (*CallStaticByteMethodA
) (JNIEnv
*, jclass
, jmethodID
,
363 jchar (*CallStaticCharMethod
) (JNIEnv
*, jclass
, jmethodID
,
365 jchar (*CallStaticCharMethodV
) (JNIEnv
*, jclass
, jmethodID
,
367 jchar (*CallStaticCharMethodA
) (JNIEnv
*, jclass
, jmethodID
,
369 jshort (*CallStaticShortMethod
) (JNIEnv
*, jclass
, jmethodID
,
371 jshort (*CallStaticShortMethodV
) (JNIEnv
*, jclass
, jmethodID
,
373 jshort (*CallStaticShortMethodA
) (JNIEnv
*, jclass
, jmethodID
,
375 jint (*CallStaticIntMethod
) (JNIEnv
*, jclass
, jmethodID
,
377 jint (*CallStaticIntMethodV
) (JNIEnv
*, jclass
, jmethodID
,
379 jint (*CallStaticIntMethodA
) (JNIEnv
*, jclass
, jmethodID
,
381 jlong (*CallStaticLongMethod
) (JNIEnv
*, jclass
, jmethodID
,
383 jlong (*CallStaticLongMethodV
) (JNIEnv
*, jclass
, jmethodID
,
385 jlong (*CallStaticLongMethodA
) (JNIEnv
*, jclass
, jmethodID
,
387 jfloat (*CallStaticFloatMethod
) (JNIEnv
*, jclass
, jmethodID
,
389 jfloat (*CallStaticFloatMethodV
) (JNIEnv
*, jclass
, jmethodID
,
391 jfloat (*CallStaticFloatMethodA
) (JNIEnv
*, jclass
, jmethodID
,
393 jdouble (*CallStaticDoubleMethod
) (JNIEnv
*, jclass
, jmethodID
,
395 jdouble (*CallStaticDoubleMethodV
) (JNIEnv
*, jclass
, jmethodID
,
397 jdouble (*CallStaticDoubleMethodA
) (JNIEnv
*, jclass
, jmethodID
,
399 void (*CallStaticVoidMethod
) (JNIEnv
*, jclass
, jmethodID
,
401 void (*CallStaticVoidMethodV
) (JNIEnv
*, jclass
, jmethodID
,
403 void (*CallStaticVoidMethodA
) (JNIEnv
*, jclass
, jmethodID
,
406 jfieldID (*GetStaticFieldID
) (JNIEnv
*, jclass
, const char *,
409 jobject (*GetStaticObjectField
) (JNIEnv
*, jclass
, jfieldID
);
410 jboolean (*GetStaticBooleanField
) (JNIEnv
*, jclass
, jfieldID
);
411 jbyte (*GetStaticByteField
) (JNIEnv
*, jclass
, jfieldID
);
412 jchar (*GetStaticCharField
) (JNIEnv
*, jclass
, jfieldID
);
413 jshort (*GetStaticShortField
) (JNIEnv
*, jclass
, jfieldID
);
414 jint (*GetStaticIntField
) (JNIEnv
*, jclass
, jfieldID
);
415 jlong (*GetStaticLongField
) (JNIEnv
*, jclass
, jfieldID
);
416 jfloat (*GetStaticFloatField
) (JNIEnv
*, jclass
, jfieldID
);
417 jdouble (*GetStaticDoubleField
) (JNIEnv
*, jclass
, jfieldID
);
419 void (*SetStaticObjectField
) (JNIEnv
*, jclass
,
421 void (*SetStaticBooleanField
) (JNIEnv
*, jclass
,
423 void (*SetStaticByteField
) (JNIEnv
*, jclass
,
425 void (*SetStaticCharField
) (JNIEnv
*, jclass
,
427 void (*SetStaticShortField
) (JNIEnv
*, jclass
,
429 void (*SetStaticIntField
) (JNIEnv
*, jclass
,
431 void (*SetStaticLongField
) (JNIEnv
*, jclass
,
433 void (*SetStaticFloatField
) (JNIEnv
*, jclass
,
435 void (*SetStaticDoubleField
) (JNIEnv
*, jclass
,
438 jstring (*NewString
) (JNIEnv
*, const jchar
*, jsize
);
439 jint (*GetStringLength
) (JNIEnv
*, jstring
);
440 const jchar
* (*GetStringChars
) (JNIEnv
*, jstring
, jboolean
*);
441 void (*ReleaseStringChars
) (JNIEnv
*, jstring
, const jchar
*);
442 jstring (*NewStringUTF
) (JNIEnv
*, const char *);
443 jsize (*GetStringUTFLength
) (JNIEnv
*, jstring
);
444 const char * (*GetStringUTFChars
) (JNIEnv
*, jstring
, jboolean
*);
445 void (*ReleaseStringUTFChars
) (JNIEnv
*, jstring
, const char *);
446 jsize (*GetArrayLength
) (JNIEnv
*, jarray
);
447 jarray (*NewObjectArray
) (JNIEnv
*, jsize
, jclass
, jobject
);
448 jobject (*GetObjectArrayElement
) (JNIEnv
*, jobjectArray
, jsize
);
449 void (*SetObjectArrayElement
) (JNIEnv
*, jobjectArray
, jsize
,
452 jbooleanArray (*NewBooleanArray
) (JNIEnv
*, jsize
);
453 jbyteArray (*NewByteArray
) (JNIEnv
*, jsize
);
454 jcharArray (*NewCharArray
) (JNIEnv
*, jsize
);
455 jshortArray (*NewShortArray
) (JNIEnv
*, jsize
);
456 jintArray (*NewIntArray
) (JNIEnv
*, jsize
);
457 jlongArray (*NewLongArray
) (JNIEnv
*, jsize
);
458 jfloatArray (*NewFloatArray
) (JNIEnv
*, jsize
);
459 jdoubleArray (*NewDoubleArray
) (JNIEnv
*, jsize
);
461 jboolean
* (*GetBooleanArrayElements
) (JNIEnv
*, jbooleanArray
,
463 jbyte
* (*GetByteArrayElements
) (JNIEnv
*, jbyteArray
,
465 jchar
* (*GetCharArrayElements
) (JNIEnv
*, jcharArray
,
467 jshort
* (*GetShortArrayElements
) (JNIEnv
*, jshortArray
,
469 jint
* (*GetIntArrayElements
) (JNIEnv
*, jintArray
,
471 jlong
* (*GetLongArrayElements
) (JNIEnv
*, jlongArray
,
473 jfloat
* (*GetFloatArrayElements
) (JNIEnv
*, jfloatArray
,
475 jdouble
* (*GetDoubleArrayElements
) (JNIEnv
*, jdoubleArray
,
478 void (*ReleaseBooleanArrayElements
) (JNIEnv
*, jbooleanArray
,
480 void (*ReleaseByteArrayElements
) (JNIEnv
*, jbyteArray
,
482 void (*ReleaseCharArrayElements
) (JNIEnv
*, jcharArray
,
484 void (*ReleaseShortArrayElements
) (JNIEnv
*, jshortArray
,
486 void (*ReleaseIntArrayElements
) (JNIEnv
*, jintArray
,
488 void (*ReleaseLongArrayElements
) (JNIEnv
*, jlongArray
,
490 void (*ReleaseFloatArrayElements
) (JNIEnv
*, jfloatArray
,
492 void (*ReleaseDoubleArrayElements
) (JNIEnv
*, jdoubleArray
,
495 void (*GetBooleanArrayRegion
) (JNIEnv
*, jbooleanArray
,
496 jsize
, jsize
, jboolean
*);
497 void (*GetByteArrayRegion
) (JNIEnv
*, jbooleanArray
,
498 jsize
, jsize
, jboolean
*);
499 void (*GetCharArrayRegion
) (JNIEnv
*, jbooleanArray
,
500 jsize
, jsize
, jboolean
*);
501 void (*GetShortArrayRegion
) (JNIEnv
*, jbooleanArray
,
502 jsize
, jsize
, jboolean
*);
503 void (*GetIntArrayRegion
) (JNIEnv
*, jbooleanArray
,
504 jsize
, jsize
, jboolean
*);
505 void (*GetLongArrayRegion
) (JNIEnv
*, jbooleanArray
,
506 jsize
, jsize
, jboolean
*);
507 void (*GetFloatArrayRegion
) (JNIEnv
*, jbooleanArray
,
508 jsize
, jsize
, jboolean
*);
509 void (*GetDoubleArrayRegion
) (JNIEnv
*, jbooleanArray
,
510 jsize
, jsize
, jboolean
*);
512 void (*SetBooleanArrayRegion
) (JNIEnv
*, jbooleanArray
,
513 jsize
, jsize
, jboolean
*);
514 void (*SetByteArrayRegion
) (JNIEnv
*, jbooleanArray
,
515 jsize
, jsize
, jboolean
*);
516 void (*SetCharArrayRegion
) (JNIEnv
*, jbooleanArray
,
517 jsize
, jsize
, jboolean
*);
518 void (*SetShortArrayRegion
) (JNIEnv
*, jbooleanArray
,
519 jsize
, jsize
, jboolean
*);
520 void (*SetIntArrayRegion
) (JNIEnv
*, jbooleanArray
,
521 jsize
, jsize
, jboolean
*);
522 void (*SetLongArrayRegion
) (JNIEnv
*, jbooleanArray
,
523 jsize
, jsize
, jboolean
*);
524 void (*SetFloatArrayRegion
) (JNIEnv
*, jbooleanArray
,
525 jsize
, jsize
, jboolean
*);
526 void (*SetDoubleArrayRegion
) (JNIEnv
*, jbooleanArray
,
527 jsize
, jsize
, jboolean
*);
529 jint (*RegisterNatives
) (JNIEnv
*, jclass
,
530 const JNINativeMethod
*, jint
);
531 jint (*UnregisterNatives
) (JNIEnv
*, jclass
);
532 jint (*MonitorEnter
) (JNIEnv
*, jobject
);
533 jint (*MonitorExit
) (JNIEnv
*, jobject
);
534 jint (*GetJavaVM
) (JNIEnv
*, JavaVM
**);
536 void (*GetStringRegion
) (JNIEnv
*, jstring
, jsize
,
538 void (*GetStringUTFRegion
) (JNIEnv
*, jstring
, jsize
,
541 void * (*GetPrimitiveArrayCritical
) (JNIEnv
*, jarray
, jboolean
*);
542 void (*ReleasePrimitiveArrayCritical
) (JNIEnv
*, jarray
, void *, jint
);
544 const jchar
* (*GetStringCritical
) (JNIEnv
*, jstring
, jboolean
*);
545 void (*ReleaseStringCritical
) (JNIEnv
*, jstring
, const jchar
*);
547 jweak (*NewWeakGlobalRef
) (JNIEnv
*, jobject
);
548 void (*DeleteWeakGlobalRef
) (JNIEnv
*, jweak
);
550 jboolean (*ExceptionCheck
) (JNIEnv
*);
558 /* The method table. */
559 struct JNINativeInterface
*p
;
561 /* FIXME: this is really ugly. */
562 #ifndef __GCJ_JNI_IMPL__
565 /* The current exception. */
568 /* The class of the current native method. */
571 /* The chain of local frames. */
572 struct _Jv_JNI_LocalFrame
*locals
;
576 { return p
->GetVersion (this); }
578 jclass
DefineClass (jobject obj0
, const jbyte
* val1
, jsize val2
)
579 { return p
->DefineClass (this, obj0
, val1
, val2
); }
581 jclass
FindClass (const char * val0
)
582 { return p
->FindClass (this, val0
); }
584 jmethodID
FromReflectedMethod (jobject obj0
)
585 { return p
->FromReflectedMethod (this, obj0
); }
587 jfieldID
FromReflectedField (jobject obj0
)
588 { return p
->FromReflectedField (this, obj0
); }
590 jobject
ToReflectedMethod (jclass cl0
, jmethodID meth1
, jboolean val2
)
591 { return p
->ToReflectedMethod (this, cl0
, meth1
, val2
); }
593 jclass
GetSuperclass (jclass cl0
)
594 { return p
->GetSuperclass (this, cl0
); }
596 jboolean
IsAssignableFrom (jclass cl0
, jclass cl1
)
597 { return p
->IsAssignableFrom (this, cl0
, cl1
); }
599 jobject
ToReflectedField (jclass cl0
, jfieldID fld1
, jboolean val2
)
600 { return p
->ToReflectedField (this, cl0
, fld1
, val2
); }
602 jint
Throw (jthrowable val0
)
603 { return p
->Throw (this, val0
); }
605 jint
ThrowNew (jclass cl0
, const char * val1
)
606 { return p
->ThrowNew (this, cl0
, val1
); }
608 jthrowable
ExceptionOccurred ()
609 { return p
->ExceptionOccurred (this); }
611 void ExceptionDescribe ()
612 { p
->ExceptionDescribe (this); }
614 void ExceptionClear ()
615 { p
->ExceptionClear (this); }
617 void FatalError (const char * val0
)
618 { p
->FatalError (this, val0
); }
620 jint
PushLocalFrame (jint val0
)
621 { return p
->PushLocalFrame (this, val0
); }
623 jobject
PopLocalFrame (jobject obj0
)
624 { return p
->PopLocalFrame (this, obj0
); }
626 jobject
NewGlobalRef (jobject obj0
)
627 { return p
->NewGlobalRef (this, obj0
); }
629 void DeleteGlobalRef (jobject obj0
)
630 { p
->DeleteGlobalRef (this, obj0
); }
632 void DeleteLocalRef (jobject obj0
)
633 { p
->DeleteLocalRef (this, obj0
); }
635 jboolean
IsSameObject (jobject obj0
, jobject obj1
)
636 { return p
->IsSameObject (this, obj0
, obj1
); }
638 jobject
NewLocalRef (jobject obj0
)
639 { return p
->NewLocalRef (this, obj0
); }
641 jint
EnsureLocalCapacity (jint val0
)
642 { return p
->EnsureLocalCapacity (this, val0
); }
644 jobject
AllocObject (jclass cl0
)
645 { return p
->AllocObject (this, cl0
); }
647 jobject
NewObject (jclass cl0
, jmethodID meth1
, ...)
650 va_start (args
, meth1
);
651 jobject result
= p
->NewObjectV (this, cl0
, meth1
, args
);
656 jobject
NewObjectV (jclass cl0
, jmethodID meth1
, _Jv_va_list val2
)
657 { return p
->NewObjectV (this, cl0
, meth1
, val2
); }
659 jobject
NewObjectA (jclass cl0
, jmethodID meth1
, jvalue
* val2
)
660 { return p
->NewObjectA (this, cl0
, meth1
, val2
); }
662 jclass
GetObjectClass (jobject obj0
)
663 { return p
->GetObjectClass (this, obj0
); }
665 jboolean
IsInstanceOf (jobject obj0
, jclass cl1
)
666 { return p
->IsInstanceOf (this, obj0
, cl1
); }
668 jmethodID
GetMethodID (jclass cl0
, const char * val1
, const char * val2
)
669 { return p
->GetMethodID (this, cl0
, val1
, val2
); }
671 jobject
CallObjectMethod (jobject obj0
, jmethodID meth1
, ...)
674 va_start (args
, meth1
);
675 jobject result
= p
->CallObjectMethodV (this, obj0
, meth1
, args
);
680 jobject
CallObjectMethodV (jobject obj0
, jmethodID meth1
, _Jv_va_list val2
)
681 { return p
->CallObjectMethodV (this, obj0
, meth1
, val2
); }
683 jobject
CallObjectMethodA (jobject obj0
, jmethodID meth1
, jvalue
* val2
)
684 { return p
->CallObjectMethodA (this, obj0
, meth1
, val2
); }
686 jboolean
CallBooleanMethod (jobject obj0
, jmethodID meth1
, ...)
689 va_start (args
, meth1
);
690 jboolean result
= p
->CallBooleanMethodV (this, obj0
, meth1
, args
);
695 jboolean
CallBooleanMethodV (jobject obj0
, jmethodID meth1
, _Jv_va_list val2
)
696 { return p
->CallBooleanMethodV (this, obj0
, meth1
, val2
); }
698 jboolean
CallBooleanMethodA (jobject obj0
, jmethodID meth1
, jvalue
* val2
)
699 { return p
->CallBooleanMethodA (this, obj0
, meth1
, val2
); }
701 jbyte
CallByteMethod (jobject obj0
, jmethodID meth1
, ...)
704 va_start (args
, meth1
);
705 jbyte result
= p
->CallByteMethodV (this, obj0
, meth1
, args
);
710 jbyte
CallByteMethodV (jobject obj0
, jmethodID meth1
, _Jv_va_list val2
)
711 { return p
->CallByteMethodV (this, obj0
, meth1
, val2
); }
713 jbyte
CallByteMethodA (jobject obj0
, jmethodID meth1
, jvalue
* val2
)
714 { return p
->CallByteMethodA (this, obj0
, meth1
, val2
); }
716 jchar
CallCharMethod (jobject obj0
, jmethodID meth1
, ...)
719 va_start (args
, meth1
);
720 jchar result
= p
->CallCharMethodV (this, obj0
, meth1
, args
);
725 jchar
CallCharMethodV (jobject obj0
, jmethodID meth1
, _Jv_va_list val2
)
726 { return p
->CallCharMethodV (this, obj0
, meth1
, val2
); }
728 jchar
CallCharMethodA (jobject obj0
, jmethodID meth1
, jvalue
* val2
)
729 { return p
->CallCharMethodA (this, obj0
, meth1
, val2
); }
731 jshort
CallShortMethod (jobject obj0
, jmethodID meth1
, ...)
734 va_start (args
, meth1
);
735 jshort result
= p
->CallShortMethodV (this, obj0
, meth1
, args
);
740 jshort
CallShortMethodV (jobject obj0
, jmethodID meth1
, _Jv_va_list val2
)
741 { return p
->CallShortMethodV (this, obj0
, meth1
, val2
); }
743 jshort
CallShortMethodA (jobject obj0
, jmethodID meth1
, jvalue
* val2
)
744 { return p
->CallShortMethodA (this, obj0
, meth1
, val2
); }
746 jint
CallIntMethod (jobject obj0
, jmethodID meth1
, ...)
749 va_start (args
, meth1
);
750 jint result
= p
->CallIntMethodV (this, obj0
, meth1
, args
);
755 jint
CallIntMethodV (jobject obj0
, jmethodID meth1
, _Jv_va_list val2
)
756 { return p
->CallIntMethodV (this, obj0
, meth1
, val2
); }
758 jint
CallIntMethodA (jobject obj0
, jmethodID meth1
, jvalue
* val2
)
759 { return p
->CallIntMethodA (this, obj0
, meth1
, val2
); }
761 jlong
CallLongMethod (jobject obj0
, jmethodID meth1
, ...)
764 va_start (args
, meth1
);
765 jlong result
= p
->CallLongMethodV (this, obj0
, meth1
, args
);
770 jlong
CallLongMethodV (jobject obj0
, jmethodID meth1
, _Jv_va_list val2
)
771 { return p
->CallLongMethodV (this, obj0
, meth1
, val2
); }
773 jlong
CallLongMethodA (jobject obj0
, jmethodID meth1
, jvalue
* val2
)
774 { return p
->CallLongMethodA (this, obj0
, meth1
, val2
); }
776 jfloat
CallFloatMethod (jobject obj0
, jmethodID meth1
, ...)
779 va_start (args
, meth1
);
780 jfloat result
= p
->CallFloatMethodV (this, obj0
, meth1
, args
);
785 jfloat
CallFloatMethodV (jobject obj0
, jmethodID meth1
, _Jv_va_list val2
)
786 { return p
->CallFloatMethodV (this, obj0
, meth1
, val2
); }
788 jfloat
CallFloatMethodA (jobject obj0
, jmethodID meth1
, jvalue
* val2
)
789 { return p
->CallFloatMethodA (this, obj0
, meth1
, val2
); }
791 jdouble
CallDoubleMethod (jobject obj0
, jmethodID meth1
, ...)
794 va_start (args
, meth1
);
795 jdouble result
= p
->CallDoubleMethodV (this, obj0
, meth1
, args
);
800 jdouble
CallDoubleMethodV (jobject obj0
, jmethodID meth1
, _Jv_va_list val2
)
801 { return p
->CallDoubleMethodV (this, obj0
, meth1
, val2
); }
803 jdouble
CallDoubleMethodA (jobject obj0
, jmethodID meth1
, jvalue
* val2
)
804 { return p
->CallDoubleMethodA (this, obj0
, meth1
, val2
); }
806 void CallVoidMethod (jobject obj0
, jmethodID meth1
, ...)
809 va_start (args
, meth1
);
810 p
->CallVoidMethodV (this, obj0
, meth1
, args
);
814 void CallVoidMethodV (jobject obj0
, jmethodID meth1
, _Jv_va_list val2
)
815 { p
->CallVoidMethodV (this, obj0
, meth1
, val2
); }
817 void CallVoidMethodA (jobject obj0
, jmethodID meth1
, jvalue
* val2
)
818 { p
->CallVoidMethodA (this, obj0
, meth1
, val2
); }
820 jobject
CallNonvirtualObjectMethod (jobject obj0
, jclass cl1
, jmethodID meth2
, ...)
823 va_start (args
, meth2
);
824 jobject result
= p
->CallNonvirtualObjectMethodV (this, obj0
, cl1
, meth2
, args
);
829 jobject
CallNonvirtualObjectMethodV (jobject obj0
, jclass cl1
, jmethodID meth2
, _Jv_va_list val3
)
830 { return p
->CallNonvirtualObjectMethodV (this, obj0
, cl1
, meth2
, val3
); }
832 jobject
CallNonvirtualObjectMethodA (jobject obj0
, jclass cl1
, jmethodID meth2
, jvalue
* val3
)
833 { return p
->CallNonvirtualObjectMethodA (this, obj0
, cl1
, meth2
, val3
); }
835 jboolean
CallNonvirtualBooleanMethod (jobject obj0
, jclass cl1
, jmethodID meth2
, ...)
838 va_start (args
, meth2
);
839 jboolean result
= p
->CallNonvirtualBooleanMethodV (this, obj0
, cl1
, meth2
, args
);
844 jboolean
CallNonvirtualBooleanMethodV (jobject obj0
, jclass cl1
, jmethodID meth2
, _Jv_va_list val3
)
845 { return p
->CallNonvirtualBooleanMethodV (this, obj0
, cl1
, meth2
, val3
); }
847 jboolean
CallNonvirtualBooleanMethodA (jobject obj0
, jclass cl1
, jmethodID meth2
, jvalue
* val3
)
848 { return p
->CallNonvirtualBooleanMethodA (this, obj0
, cl1
, meth2
, val3
); }
850 jbyte
CallNonvirtualByteMethod (jobject obj0
, jclass cl1
, jmethodID meth2
, ...)
853 va_start (args
, meth2
);
854 jbyte result
= p
->CallNonvirtualByteMethodV (this, obj0
, cl1
, meth2
, args
);
859 jbyte
CallNonvirtualByteMethodV (jobject obj0
, jclass cl1
, jmethodID meth2
, _Jv_va_list val3
)
860 { return p
->CallNonvirtualByteMethodV (this, obj0
, cl1
, meth2
, val3
); }
862 jbyte
CallNonvirtualByteMethodA (jobject obj0
, jclass cl1
, jmethodID meth2
, jvalue
* val3
)
863 { return p
->CallNonvirtualByteMethodA (this, obj0
, cl1
, meth2
, val3
); }
865 jchar
CallNonvirtualCharMethod (jobject obj0
, jclass cl1
, jmethodID meth2
, ...)
868 va_start (args
, meth2
);
869 jchar result
= p
->CallNonvirtualCharMethodV (this, obj0
, cl1
, meth2
, args
);
874 jchar
CallNonvirtualCharMethodV (jobject obj0
, jclass cl1
, jmethodID meth2
, _Jv_va_list val3
)
875 { return p
->CallNonvirtualCharMethodV (this, obj0
, cl1
, meth2
, val3
); }
877 jchar
CallNonvirtualCharMethodA (jobject obj0
, jclass cl1
, jmethodID meth2
, jvalue
* val3
)
878 { return p
->CallNonvirtualCharMethodA (this, obj0
, cl1
, meth2
, val3
); }
880 jshort
CallNonvirtualShortMethod (jobject obj0
, jclass cl1
, jmethodID meth2
, ...)
883 va_start (args
, meth2
);
884 jshort result
= p
->CallNonvirtualShortMethodV (this, obj0
, cl1
, meth2
, args
);
889 jshort
CallNonvirtualShortMethodV (jobject obj0
, jclass cl1
, jmethodID meth2
, _Jv_va_list val3
)
890 { return p
->CallNonvirtualShortMethodV (this, obj0
, cl1
, meth2
, val3
); }
892 jshort
CallNonvirtualShortMethodA (jobject obj0
, jclass cl1
, jmethodID meth2
, jvalue
* val3
)
893 { return p
->CallNonvirtualShortMethodA (this, obj0
, cl1
, meth2
, val3
); }
895 jint
CallNonvirtualIntMethod (jobject obj0
, jclass cl1
, jmethodID meth2
, ...)
898 va_start (args
, meth2
);
899 jint result
= p
->CallNonvirtualIntMethodV (this, obj0
, cl1
, meth2
, args
);
904 jint
CallNonvirtualIntMethodV (jobject obj0
, jclass cl1
, jmethodID meth2
, _Jv_va_list val3
)
905 { return p
->CallNonvirtualIntMethodV (this, obj0
, cl1
, meth2
, val3
); }
907 jint
CallNonvirtualIntMethodA (jobject obj0
, jclass cl1
, jmethodID meth2
, jvalue
* val3
)
908 { return p
->CallNonvirtualIntMethodA (this, obj0
, cl1
, meth2
, val3
); }
910 jlong
CallNonvirtualLongMethod (jobject obj0
, jclass cl1
, jmethodID meth2
, ...)
913 va_start (args
, meth2
);
914 jlong result
= p
->CallNonvirtualLongMethodV (this, obj0
, cl1
, meth2
, args
);
919 jlong
CallNonvirtualLongMethodV (jobject obj0
, jclass cl1
, jmethodID meth2
, _Jv_va_list val3
)
920 { return p
->CallNonvirtualLongMethodV (this, obj0
, cl1
, meth2
, val3
); }
922 jlong
CallNonvirtualLongMethodA (jobject obj0
, jclass cl1
, jmethodID meth2
, jvalue
* val3
)
923 { return p
->CallNonvirtualLongMethodA (this, obj0
, cl1
, meth2
, val3
); }
925 jfloat
CallNonvirtualFloatMethod (jobject obj0
, jclass cl1
, jmethodID meth2
, ...)
928 va_start (args
, meth2
);
929 jfloat result
= p
->CallNonvirtualFloatMethodV (this, obj0
, cl1
, meth2
, args
);
934 jfloat
CallNonvirtualFloatMethodV (jobject obj0
, jclass cl1
, jmethodID meth2
, _Jv_va_list val3
)
935 { return p
->CallNonvirtualFloatMethodV (this, obj0
, cl1
, meth2
, val3
); }
937 jfloat
CallNonvirtualFloatMethodA (jobject obj0
, jclass cl1
, jmethodID meth2
, jvalue
* val3
)
938 { return p
->CallNonvirtualFloatMethodA (this, obj0
, cl1
, meth2
, val3
); }
940 jdouble
CallNonvirtualDoubleMethod (jobject obj0
, jclass cl1
, jmethodID meth2
, ...)
943 va_start (args
, meth2
);
944 jdouble result
= p
->CallNonvirtualDoubleMethodV (this, obj0
, cl1
, meth2
, args
);
949 jdouble
CallNonvirtualDoubleMethodV (jobject obj0
, jclass cl1
, jmethodID meth2
, _Jv_va_list val3
)
950 { return p
->CallNonvirtualDoubleMethodV (this, obj0
, cl1
, meth2
, val3
); }
952 jdouble
CallNonvirtualDoubleMethodA (jobject obj0
, jclass cl1
, jmethodID meth2
, jvalue
* val3
)
953 { return p
->CallNonvirtualDoubleMethodA (this, obj0
, cl1
, meth2
, val3
); }
955 void CallNonvirtualVoidMethod (jobject obj0
, jclass cl1
, jmethodID meth2
, ...)
958 va_start (args
, meth2
);
959 p
->CallNonvirtualVoidMethodV (this, obj0
, cl1
, meth2
, args
);
963 void CallNonvirtualVoidMethodV (jobject obj0
, jclass cl1
, jmethodID meth2
, _Jv_va_list val3
)
964 { p
->CallNonvirtualVoidMethodV (this, obj0
, cl1
, meth2
, val3
); }
966 void CallNonvirtualVoidMethodA (jobject obj0
, jclass cl1
, jmethodID meth2
, jvalue
* val3
)
967 { p
->CallNonvirtualVoidMethodA (this, obj0
, cl1
, meth2
, val3
); }
969 jfieldID
GetFieldID (jclass cl0
, const char * val1
, const char * val2
)
970 { return p
->GetFieldID (this, cl0
, val1
, val2
); }
972 jobject
GetObjectField (jobject obj0
, jfieldID fld1
)
973 { return p
->GetObjectField (this, obj0
, fld1
); }
975 jboolean
GetBooleanField (jobject obj0
, jfieldID fld1
)
976 { return p
->GetBooleanField (this, obj0
, fld1
); }
978 jbyte
GetByteField (jobject obj0
, jfieldID fld1
)
979 { return p
->GetByteField (this, obj0
, fld1
); }
981 jchar
GetCharField (jobject obj0
, jfieldID fld1
)
982 { return p
->GetCharField (this, obj0
, fld1
); }
984 jshort
GetShortField (jobject obj0
, jfieldID fld1
)
985 { return p
->GetShortField (this, obj0
, fld1
); }
987 jint
GetIntField (jobject obj0
, jfieldID fld1
)
988 { return p
->GetIntField (this, obj0
, fld1
); }
990 jlong
GetLongField (jobject obj0
, jfieldID fld1
)
991 { return p
->GetLongField (this, obj0
, fld1
); }
993 jfloat
GetFloatField (jobject obj0
, jfieldID fld1
)
994 { return p
->GetFloatField (this, obj0
, fld1
); }
996 jdouble
GetDoubleField (jobject obj0
, jfieldID fld1
)
997 { return p
->GetDoubleField (this, obj0
, fld1
); }
999 void SetObjectField (jobject obj0
, jfieldID fld1
, jobject obj2
)
1000 { p
->SetObjectField (this, obj0
, fld1
, obj2
); }
1002 void SetBooleanField (jobject obj0
, jfieldID fld1
, jboolean val2
)
1003 { p
->SetBooleanField (this, obj0
, fld1
, val2
); }
1005 void SetByteField (jobject obj0
, jfieldID fld1
, jbyte val2
)
1006 { p
->SetByteField (this, obj0
, fld1
, val2
); }
1008 void SetCharField (jobject obj0
, jfieldID fld1
, jchar val2
)
1009 { p
->SetCharField (this, obj0
, fld1
, val2
); }
1011 void SetShortField (jobject obj0
, jfieldID fld1
, jshort val2
)
1012 { p
->SetShortField (this, obj0
, fld1
, val2
); }
1014 void SetIntField (jobject obj0
, jfieldID fld1
, jint val2
)
1015 { p
->SetIntField (this, obj0
, fld1
, val2
); }
1017 void SetLongField (jobject obj0
, jfieldID fld1
, jlong val2
)
1018 { p
->SetLongField (this, obj0
, fld1
, val2
); }
1020 void SetFloatField (jobject obj0
, jfieldID fld1
, jfloat val2
)
1021 { p
->SetFloatField (this, obj0
, fld1
, val2
); }
1023 void SetDoubleField (jobject obj0
, jfieldID fld1
, jdouble val2
)
1024 { p
->SetDoubleField (this, obj0
, fld1
, val2
); }
1026 jmethodID
GetStaticMethodID (jclass cl0
, const char * val1
, const char * val2
)
1027 { return p
->GetStaticMethodID (this, cl0
, val1
, val2
); }
1029 jobject
CallStaticObjectMethod (jclass cl0
, jmethodID meth1
, ...)
1032 va_start (args
, meth1
);
1033 jobject result
= p
->CallStaticObjectMethodV (this, cl0
, meth1
, args
);
1038 jobject
CallStaticObjectMethodV (jclass cl0
, jmethodID meth1
, _Jv_va_list val2
)
1039 { return p
->CallStaticObjectMethodV (this, cl0
, meth1
, val2
); }
1041 jobject
CallStaticObjectMethodA (jclass cl0
, jmethodID meth1
, jvalue
* val2
)
1042 { return p
->CallStaticObjectMethodA (this, cl0
, meth1
, val2
); }
1044 jboolean
CallStaticBooleanMethod (jclass cl0
, jmethodID meth1
, ...)
1047 va_start (args
, meth1
);
1048 jboolean result
= p
->CallStaticBooleanMethodV (this, cl0
, meth1
, args
);
1053 jboolean
CallStaticBooleanMethodV (jclass cl0
, jmethodID meth1
, _Jv_va_list val2
)
1054 { return p
->CallStaticBooleanMethodV (this, cl0
, meth1
, val2
); }
1056 jboolean
CallStaticBooleanMethodA (jclass cl0
, jmethodID meth1
, jvalue
* val2
)
1057 { return p
->CallStaticBooleanMethodA (this, cl0
, meth1
, val2
); }
1059 jbyte
CallStaticByteMethod (jclass cl0
, jmethodID meth1
, ...)
1062 va_start (args
, meth1
);
1063 jbyte result
= p
->CallStaticByteMethodV (this, cl0
, meth1
, args
);
1068 jbyte
CallStaticByteMethodV (jclass cl0
, jmethodID meth1
, _Jv_va_list val2
)
1069 { return p
->CallStaticByteMethodV (this, cl0
, meth1
, val2
); }
1071 jbyte
CallStaticByteMethodA (jclass cl0
, jmethodID meth1
, jvalue
* val2
)
1072 { return p
->CallStaticByteMethodA (this, cl0
, meth1
, val2
); }
1074 jchar
CallStaticCharMethod (jclass cl0
, jmethodID meth1
, ...)
1077 va_start (args
, meth1
);
1078 jchar result
= p
->CallStaticCharMethodV (this, cl0
, meth1
, args
);
1083 jchar
CallStaticCharMethodV (jclass cl0
, jmethodID meth1
, _Jv_va_list val2
)
1084 { return p
->CallStaticCharMethodV (this, cl0
, meth1
, val2
); }
1086 jchar
CallStaticCharMethodA (jclass cl0
, jmethodID meth1
, jvalue
* val2
)
1087 { return p
->CallStaticCharMethodA (this, cl0
, meth1
, val2
); }
1089 jshort
CallStaticShortMethod (jclass cl0
, jmethodID meth1
, ...)
1092 va_start (args
, meth1
);
1093 jshort result
= p
->CallStaticShortMethodV (this, cl0
, meth1
, args
);
1098 jshort
CallStaticShortMethodV (jclass cl0
, jmethodID meth1
, _Jv_va_list val2
)
1099 { return p
->CallStaticShortMethodV (this, cl0
, meth1
, val2
); }
1101 jshort
CallStaticShortMethodA (jclass cl0
, jmethodID meth1
, jvalue
* val2
)
1102 { return p
->CallStaticShortMethodA (this, cl0
, meth1
, val2
); }
1104 jint
CallStaticIntMethod (jclass cl0
, jmethodID meth1
, ...)
1107 va_start (args
, meth1
);
1108 jint result
= p
->CallStaticIntMethodV (this, cl0
, meth1
, args
);
1113 jint
CallStaticIntMethodV (jclass cl0
, jmethodID meth1
, _Jv_va_list val2
)
1114 { return p
->CallStaticIntMethodV (this, cl0
, meth1
, val2
); }
1116 jint
CallStaticIntMethodA (jclass cl0
, jmethodID meth1
, jvalue
* val2
)
1117 { return p
->CallStaticIntMethodA (this, cl0
, meth1
, val2
); }
1119 jlong
CallStaticLongMethod (jclass cl0
, jmethodID meth1
, ...)
1122 va_start (args
, meth1
);
1123 jlong result
= p
->CallStaticLongMethodV (this, cl0
, meth1
, args
);
1128 jlong
CallStaticLongMethodV (jclass cl0
, jmethodID meth1
, _Jv_va_list val2
)
1129 { return p
->CallStaticLongMethodV (this, cl0
, meth1
, val2
); }
1131 jlong
CallStaticLongMethodA (jclass cl0
, jmethodID meth1
, jvalue
* val2
)
1132 { return p
->CallStaticLongMethodA (this, cl0
, meth1
, val2
); }
1134 jfloat
CallStaticFloatMethod (jclass cl0
, jmethodID meth1
, ...)
1137 va_start (args
, meth1
);
1138 jfloat result
= p
->CallStaticFloatMethodV (this, cl0
, meth1
, args
);
1143 jfloat
CallStaticFloatMethodV (jclass cl0
, jmethodID meth1
, _Jv_va_list val2
)
1144 { return p
->CallStaticFloatMethodV (this, cl0
, meth1
, val2
); }
1146 jfloat
CallStaticFloatMethodA (jclass cl0
, jmethodID meth1
, jvalue
* val2
)
1147 { return p
->CallStaticFloatMethodA (this, cl0
, meth1
, val2
); }
1149 jdouble
CallStaticDoubleMethod (jclass cl0
, jmethodID meth1
, ...)
1152 va_start (args
, meth1
);
1153 jdouble result
= p
->CallStaticDoubleMethodV (this, cl0
, meth1
, args
);
1158 jdouble
CallStaticDoubleMethodV (jclass cl0
, jmethodID meth1
, _Jv_va_list val2
)
1159 { return p
->CallStaticDoubleMethodV (this, cl0
, meth1
, val2
); }
1161 jdouble
CallStaticDoubleMethodA (jclass cl0
, jmethodID meth1
, jvalue
* val2
)
1162 { return p
->CallStaticDoubleMethodA (this, cl0
, meth1
, val2
); }
1164 void CallStaticVoidMethod (jclass cl0
, jmethodID meth1
, ...)
1167 va_start (args
, meth1
);
1168 p
->CallStaticVoidMethodV (this, cl0
, meth1
, args
);
1172 void CallStaticVoidMethodV (jclass cl0
, jmethodID meth1
, _Jv_va_list val2
)
1173 { p
->CallStaticVoidMethodV (this, cl0
, meth1
, val2
); }
1175 void CallStaticVoidMethodA (jclass cl0
, jmethodID meth1
, jvalue
* val2
)
1176 { p
->CallStaticVoidMethodA (this, cl0
, meth1
, val2
); }
1178 jfieldID
GetStaticFieldID (jclass cl0
, const char * val1
, const char * val2
)
1179 { return p
->GetStaticFieldID (this, cl0
, val1
, val2
); }
1181 jobject
GetStaticObjectField (jclass cl0
, jfieldID fld1
)
1182 { return p
->GetStaticObjectField (this, cl0
, fld1
); }
1184 jboolean
GetStaticBooleanField (jclass cl0
, jfieldID fld1
)
1185 { return p
->GetStaticBooleanField (this, cl0
, fld1
); }
1187 jbyte
GetStaticByteField (jclass cl0
, jfieldID fld1
)
1188 { return p
->GetStaticByteField (this, cl0
, fld1
); }
1190 jchar
GetStaticCharField (jclass cl0
, jfieldID fld1
)
1191 { return p
->GetStaticCharField (this, cl0
, fld1
); }
1193 jshort
GetStaticShortField (jclass cl0
, jfieldID fld1
)
1194 { return p
->GetStaticShortField (this, cl0
, fld1
); }
1196 jint
GetStaticIntField (jclass cl0
, jfieldID fld1
)
1197 { return p
->GetStaticIntField (this, cl0
, fld1
); }
1199 jlong
GetStaticLongField (jclass cl0
, jfieldID fld1
)
1200 { return p
->GetStaticLongField (this, cl0
, fld1
); }
1202 jfloat
GetStaticFloatField (jclass cl0
, jfieldID fld1
)
1203 { return p
->GetStaticFloatField (this, cl0
, fld1
); }
1205 jdouble
GetStaticDoubleField (jclass cl0
, jfieldID fld1
)
1206 { return p
->GetStaticDoubleField (this, cl0
, fld1
); }
1208 void SetStaticObjectField (jclass cl0
, jfieldID fld1
, jobject obj2
)
1209 { p
->SetStaticObjectField (this, cl0
, fld1
, obj2
); }
1211 void SetStaticBooleanField (jclass cl0
, jfieldID fld1
, jboolean val2
)
1212 { p
->SetStaticBooleanField (this, cl0
, fld1
, val2
); }
1214 void SetStaticByteField (jclass cl0
, jfieldID fld1
, jbyte val2
)
1215 { p
->SetStaticByteField (this, cl0
, fld1
, val2
); }
1217 void SetStaticCharField (jclass cl0
, jfieldID fld1
, jchar val2
)
1218 { p
->SetStaticCharField (this, cl0
, fld1
, val2
); }
1220 void SetStaticShortField (jclass cl0
, jfieldID fld1
, jshort val2
)
1221 { p
->SetStaticShortField (this, cl0
, fld1
, val2
); }
1223 void SetStaticIntField (jclass cl0
, jfieldID fld1
, jint val2
)
1224 { p
->SetStaticIntField (this, cl0
, fld1
, val2
); }
1226 void SetStaticLongField (jclass cl0
, jfieldID fld1
, jlong val2
)
1227 { p
->SetStaticLongField (this, cl0
, fld1
, val2
); }
1229 void SetStaticFloatField (jclass cl0
, jfieldID fld1
, jfloat val2
)
1230 { p
->SetStaticFloatField (this, cl0
, fld1
, val2
); }
1232 void SetStaticDoubleField (jclass cl0
, jfieldID fld1
, jdouble val2
)
1233 { p
->SetStaticDoubleField (this, cl0
, fld1
, val2
); }
1235 jstring
NewString (const jchar
* val0
, jsize val1
)
1236 { return p
->NewString (this, val0
, val1
); }
1238 jint
GetStringLength (jstring val0
)
1239 { return p
->GetStringLength (this, val0
); }
1241 const jchar
* GetStringChars (jstring val0
, jboolean
* val1
)
1242 { return p
->GetStringChars (this, val0
, val1
); }
1244 void ReleaseStringChars (jstring val0
, const jchar
* val1
)
1245 { p
->ReleaseStringChars (this, val0
, val1
); }
1247 jstring
NewStringUTF (const char * val0
)
1248 { return p
->NewStringUTF (this, val0
); }
1250 jsize
GetStringUTFLength (jstring val0
)
1251 { return p
->GetStringUTFLength (this, val0
); }
1253 const char * GetStringUTFChars (jstring val0
, jboolean
* val1
)
1254 { return p
->GetStringUTFChars (this, val0
, val1
); }
1256 void ReleaseStringUTFChars (jstring val0
, const char * val1
)
1257 { p
->ReleaseStringUTFChars (this, val0
, val1
); }
1259 jsize
GetArrayLength (jarray val0
)
1260 { return p
->GetArrayLength (this, val0
); }
1262 jarray
NewObjectArray (jsize val0
, jclass cl1
, jobject obj2
)
1263 { return p
->NewObjectArray (this, val0
, cl1
, obj2
); }
1265 jobject
GetObjectArrayElement (jobjectArray val0
, jsize val1
)
1266 { return p
->GetObjectArrayElement (this, val0
, val1
); }
1268 void SetObjectArrayElement (jobjectArray val0
, jsize val1
, jobject obj2
)
1269 { p
->SetObjectArrayElement (this, val0
, val1
, obj2
); }
1271 jbooleanArray
NewBooleanArray (jsize val0
)
1272 { return p
->NewBooleanArray (this, val0
); }
1274 jbyteArray
NewByteArray (jsize val0
)
1275 { return p
->NewByteArray (this, val0
); }
1277 jcharArray
NewCharArray (jsize val0
)
1278 { return p
->NewCharArray (this, val0
); }
1280 jshortArray
NewShortArray (jsize val0
)
1281 { return p
->NewShortArray (this, val0
); }
1283 jintArray
NewIntArray (jsize val0
)
1284 { return p
->NewIntArray (this, val0
); }
1286 jlongArray
NewLongArray (jsize val0
)
1287 { return p
->NewLongArray (this, val0
); }
1289 jfloatArray
NewFloatArray (jsize val0
)
1290 { return p
->NewFloatArray (this, val0
); }
1292 jdoubleArray
NewDoubleArray (jsize val0
)
1293 { return p
->NewDoubleArray (this, val0
); }
1295 jboolean
* GetBooleanArrayElements (jbooleanArray val0
, jboolean
* val1
)
1296 { return p
->GetBooleanArrayElements (this, val0
, val1
); }
1298 jbyte
* GetByteArrayElements (jbyteArray val0
, jboolean
* val1
)
1299 { return p
->GetByteArrayElements (this, val0
, val1
); }
1301 jchar
* GetCharArrayElements (jcharArray val0
, jboolean
* val1
)
1302 { return p
->GetCharArrayElements (this, val0
, val1
); }
1304 jshort
* GetShortArrayElements (jshortArray val0
, jboolean
* val1
)
1305 { return p
->GetShortArrayElements (this, val0
, val1
); }
1307 jint
* GetIntArrayElements (jintArray val0
, jboolean
* val1
)
1308 { return p
->GetIntArrayElements (this, val0
, val1
); }
1310 jlong
* GetLongArrayElements (jlongArray val0
, jboolean
* val1
)
1311 { return p
->GetLongArrayElements (this, val0
, val1
); }
1313 jfloat
* GetFloatArrayElements (jfloatArray val0
, jboolean
* val1
)
1314 { return p
->GetFloatArrayElements (this, val0
, val1
); }
1316 jdouble
* GetDoubleArrayElements (jdoubleArray val0
, jboolean
* val1
)
1317 { return p
->GetDoubleArrayElements (this, val0
, val1
); }
1319 void ReleaseBooleanArrayElements (jbooleanArray val0
, jboolean
* val1
, jint val2
)
1320 { p
->ReleaseBooleanArrayElements (this, val0
, val1
, val2
); }
1322 void ReleaseByteArrayElements (jbyteArray val0
, jbyte
* val1
, jint val2
)
1323 { p
->ReleaseByteArrayElements (this, val0
, val1
, val2
); }
1325 void ReleaseCharArrayElements (jcharArray val0
, jchar
* val1
, jint val2
)
1326 { p
->ReleaseCharArrayElements (this, val0
, val1
, val2
); }
1328 void ReleaseShortArrayElements (jshortArray val0
, jshort
* val1
, jint val2
)
1329 { p
->ReleaseShortArrayElements (this, val0
, val1
, val2
); }
1331 void ReleaseIntArrayElements (jintArray val0
, jint
* val1
, jint val2
)
1332 { p
->ReleaseIntArrayElements (this, val0
, val1
, val2
); }
1334 void ReleaseLongArrayElements (jlongArray val0
, jlong
* val1
, jint val2
)
1335 { p
->ReleaseLongArrayElements (this, val0
, val1
, val2
); }
1337 void ReleaseFloatArrayElements (jfloatArray val0
, jfloat
* val1
, jint val2
)
1338 { p
->ReleaseFloatArrayElements (this, val0
, val1
, val2
); }
1340 void ReleaseDoubleArrayElements (jdoubleArray val0
, jdouble
* val1
, jint val2
)
1341 { p
->ReleaseDoubleArrayElements (this, val0
, val1
, val2
); }
1343 void GetBooleanArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1344 { p
->GetBooleanArrayRegion (this, val0
, val1
, val2
, val3
); }
1346 void GetByteArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1347 { p
->GetByteArrayRegion (this, val0
, val1
, val2
, val3
); }
1349 void GetCharArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1350 { p
->GetCharArrayRegion (this, val0
, val1
, val2
, val3
); }
1352 void GetShortArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1353 { p
->GetShortArrayRegion (this, val0
, val1
, val2
, val3
); }
1355 void GetIntArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1356 { p
->GetIntArrayRegion (this, val0
, val1
, val2
, val3
); }
1358 void GetLongArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1359 { p
->GetLongArrayRegion (this, val0
, val1
, val2
, val3
); }
1361 void GetFloatArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1362 { p
->GetFloatArrayRegion (this, val0
, val1
, val2
, val3
); }
1364 void GetDoubleArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1365 { p
->GetDoubleArrayRegion (this, val0
, val1
, val2
, val3
); }
1367 void SetBooleanArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1368 { p
->SetBooleanArrayRegion (this, val0
, val1
, val2
, val3
); }
1370 void SetByteArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1371 { p
->SetByteArrayRegion (this, val0
, val1
, val2
, val3
); }
1373 void SetCharArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1374 { p
->SetCharArrayRegion (this, val0
, val1
, val2
, val3
); }
1376 void SetShortArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1377 { p
->SetShortArrayRegion (this, val0
, val1
, val2
, val3
); }
1379 void SetIntArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1380 { p
->SetIntArrayRegion (this, val0
, val1
, val2
, val3
); }
1382 void SetLongArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1383 { p
->SetLongArrayRegion (this, val0
, val1
, val2
, val3
); }
1385 void SetFloatArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1386 { p
->SetFloatArrayRegion (this, val0
, val1
, val2
, val3
); }
1388 void SetDoubleArrayRegion (jbooleanArray val0
, jsize val1
, jsize val2
, jboolean
* val3
)
1389 { p
->SetDoubleArrayRegion (this, val0
, val1
, val2
, val3
); }
1391 jint
RegisterNatives (jclass cl0
, const JNINativeMethod
* val1
, jint val2
)
1392 { return p
->RegisterNatives (this, cl0
, val1
, val2
); }
1394 jint
UnregisterNatives (jclass cl0
)
1395 { return p
->UnregisterNatives (this, cl0
); }
1397 jint
MonitorEnter (jobject obj0
)
1398 { return p
->MonitorEnter (this, obj0
); }
1400 jint
MonitorExit (jobject obj0
)
1401 { return p
->MonitorExit (this, obj0
); }
1403 jint
GetJavaVM (JavaVM
** val0
)
1404 { return p
->GetJavaVM (this, val0
); }
1406 void GetStringRegion (jstring val0
, jsize val1
, jsize val2
, jchar
* val3
)
1407 { p
->GetStringRegion (this, val0
, val1
, val2
, val3
); }
1409 void GetStringUTFRegion (jstring val0
, jsize val1
, jsize val2
, char * val3
)
1410 { p
->GetStringUTFRegion (this, val0
, val1
, val2
, val3
); }
1412 void * GetPrimitiveArrayCritical (jarray val0
, jboolean
* val1
)
1413 { return p
->GetPrimitiveArrayCritical (this, val0
, val1
); }
1415 void ReleasePrimitiveArrayCritical (jarray val0
, void * val1
, jint val2
)
1416 { p
->ReleasePrimitiveArrayCritical (this, val0
, val1
, val2
); }
1418 const jchar
* GetStringCritical (jstring val0
, jboolean
* val1
)
1419 { return p
->GetStringCritical (this, val0
, val1
); }
1421 void ReleaseStringCritical (jstring val0
, const jchar
* val1
)
1422 { p
->ReleaseStringCritical (this, val0
, val1
); }
1424 jweak
NewWeakGlobalRef (jobject obj0
)
1425 { return p
->NewWeakGlobalRef (this, obj0
); }
1427 void DeleteWeakGlobalRef (jweak val0
)
1428 { p
->DeleteWeakGlobalRef (this, val0
); }
1430 jboolean
ExceptionCheck ()
1431 { return p
->ExceptionCheck (this); }
1433 #endif /* __cplusplus */
1439 struct JNIInvokeInterface
1445 jint (*DestroyJavaVM
) (JavaVM
*);
1446 jint (*AttachCurrentThread
) (JavaVM
*, void **, void *);
1447 jint (*DetachCurrentThread
) (JavaVM
*);
1448 jint (*GetEnv
) (JavaVM
*, void **, jint
);
1456 const struct JNIInvokeInterface
*functions
;
1459 /* FIXME: other fields. */
1462 jint
DestroyJavaVM ()
1463 { return functions
->DestroyJavaVM (this); }
1465 jint
AttachCurrentThread (void **penv
, void *args
)
1466 { return functions
->AttachCurrentThread (this, penv
, args
); }
1468 jint
DetachCurrentThread ()
1469 { return functions
->DetachCurrentThread (this); }
1471 jint
GetEnv (void **penv
, jint version
)
1472 { return functions
->GetEnv (this, penv
, version
); }
1474 #endif /* __cplusplus */
1476 typedef struct JavaVMAttachArgs
1478 jint version
; /* Must be JNI_VERSION_1_2. */
1479 char *name
; /* The name of the thread (or NULL). */
1480 jobject group
; /* Global ref of a ThreadGroup object
1484 typedef struct JavaVMOption
1490 typedef struct JavaVMInitArgs
1492 /* Must be JNI_VERSION_1_2. */
1495 /* Number of options. */
1498 /* Options to the VM. */
1499 JavaVMOption
*options
;
1501 /* Whether we should ignore unrecognized options. */
1502 jboolean ignoreUnrecognized
;
1505 #endif /* __GCJ_JNI_H__ */