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