jni.h 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. /*******************************************************************************
  2. * Licensed Materials - Property of IBM
  3. * "Restricted Materials of IBM"
  4. *
  5. * (c) Copyright IBM Corp. 1991, 2015 All Rights Reserved
  6. *
  7. * US Government Users Restricted Rights - Use, duplication or disclosure
  8. * restricted by GSA ADP Schedule Contract with IBM Corp.
  9. *******************************************************************************/
  10. #ifndef JNI_H
  11. #define JNI_H
  12. #include <stdio.h> /* For 1.1 version of args (i.e., vfprintf) */
  13. #include <stdarg.h> /* For va_list */
  14. #include "jniport.h"
  15. #if defined JNI_JCL_H
  16. #include "jni_jcl.h"
  17. #endif
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. /* Boolean values */
  22. #define JNI_FALSE 0
  23. #define JNI_TRUE 1
  24. /* Codes for ReleaseXArrayElements */
  25. #define JNI_COMMIT 1
  26. #define JNI_ABORT 2
  27. /* JNI version numbers */
  28. #define JNI_VERSION_1_1 0x00010001
  29. #define JNI_VERSION_1_2 0x00010002
  30. #define JNI_VERSION_1_4 0x00010004
  31. #define JNI_VERSION_1_6 0x00010006
  32. #define JNI_VERSION_1_8 0x00010008
  33. #define JVMEXT_VERSION_1_1 0x7E010001
  34. /* Error codes */
  35. #define JNI_OK 0
  36. #define JNI_ERR (-1)
  37. #define JNI_EDETACHED (-2)
  38. #define JNI_EVERSION (-3)
  39. #define JNI_ENOMEM (-4)
  40. #define JNI_EEXIST (-5)
  41. #define JNI_EINVAL (-6)
  42. typedef unsigned char jboolean;
  43. /* jbyte is platform specific */
  44. typedef unsigned short jchar;
  45. typedef short jshort;
  46. /* jint is platform specific */
  47. /* jlong is platform specific */
  48. typedef float jfloat;
  49. typedef double jdouble;
  50. typedef jint jsize;
  51. #ifdef __cplusplus
  52. class _jobject {};
  53. class _jweak : public _jobject {};
  54. class _jclass : public _jobject {};
  55. class _jstring : public _jobject {};
  56. class _jthrowable : public _jobject {};
  57. class _jarray : public _jobject {};
  58. class _jobjectArray : public _jarray {};
  59. class _jbooleanArray : public _jarray {};
  60. class _jbyteArray : public _jarray {};
  61. class _jcharArray : public _jarray {};
  62. class _jshortArray : public _jarray {};
  63. class _jintArray : public _jarray {};
  64. class _jlongArray : public _jarray {};
  65. class _jfloatArray : public _jarray {};
  66. class _jdoubleArray : public _jarray {};
  67. typedef _jobject * jobject;
  68. typedef _jweak * jweak;
  69. typedef _jclass * jclass;
  70. typedef _jstring * jstring;
  71. typedef _jthrowable * jthrowable;
  72. typedef _jarray * jarray;
  73. typedef _jobjectArray * jobjectArray;
  74. typedef _jbooleanArray * jbooleanArray;
  75. typedef _jbyteArray * jbyteArray;
  76. typedef _jcharArray * jcharArray;
  77. typedef _jshortArray * jshortArray;
  78. typedef _jintArray * jintArray;
  79. typedef _jlongArray * jlongArray;
  80. typedef _jfloatArray * jfloatArray;
  81. typedef _jdoubleArray * jdoubleArray;
  82. #else
  83. struct _jobject;
  84. typedef struct _jobject * jobject;
  85. typedef jobject jweak;
  86. typedef jobject jclass;
  87. typedef jobject jstring;
  88. typedef jobject jthrowable;
  89. typedef jobject jarray;
  90. typedef jarray jobjectArray;
  91. typedef jarray jbooleanArray;
  92. typedef jarray jbyteArray;
  93. typedef jarray jcharArray;
  94. typedef jarray jshortArray;
  95. typedef jarray jintArray;
  96. typedef jarray jlongArray;
  97. typedef jarray jfloatArray;
  98. typedef jarray jdoubleArray;
  99. #endif
  100. struct _jfieldID;
  101. typedef struct _jfieldID *jfieldID;
  102. struct _jmethodID;
  103. typedef struct _jmethodID *jmethodID;
  104. /* Used for CallXXXMethodA API */
  105. typedef union jvalue {
  106. jboolean z;
  107. jbyte b;
  108. jchar c;
  109. jshort s;
  110. jint i;
  111. jlong j;
  112. jfloat f;
  113. jdouble d;
  114. jobject l;
  115. } jvalue;
  116. typedef enum jobjectRefType {
  117. JNIInvalidRefType = 0,
  118. JNILocalRefType = 1,
  119. JNIGlobalRefType = 2,
  120. JNIWeakGlobalRefType = 3,
  121. jobjectRefTypeEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  122. } jobjectRefType;
  123. typedef struct {
  124. char *name;
  125. char *signature;
  126. void *fnPtr;
  127. } JNINativeMethod;
  128. /**
  129. * JavaVMQuery structure
  130. */
  131. struct JavaVMQuery;
  132. typedef struct JavaVMQuery JavaVMQuery;
  133. /**
  134. * used in QueryGCStatus.
  135. */
  136. #define JNI_GCQUERY_NURSERY_HEAP (jint) 0x3
  137. #define JNI_GCQUERY_MATURE_HEAP (jint) 0x4
  138. /**
  139. * GCStatus structure.
  140. */
  141. typedef struct GCStatus {
  142. jint heap;
  143. jint count;
  144. jlong freestorage;
  145. jlong totalstorage;
  146. } GCStatus;
  147. struct JNINativeInterface_;
  148. struct JNIEnv_;
  149. struct JNIInvokeInterface_;
  150. struct JavaVM_;
  151. #ifdef __cplusplus
  152. typedef JNIEnv_ JNIEnv;
  153. typedef JavaVM_ JavaVM;
  154. #else
  155. typedef const struct JNINativeInterface_ *JNIEnv;
  156. typedef const struct JNIInvokeInterface_ *JavaVM;
  157. #endif
  158. struct JNINativeInterface_ {
  159. void *reserved0;
  160. void *reserved1;
  161. void *reserved2;
  162. void *reserved3;
  163. jint (JNICALL * GetVersion)(JNIEnv *env);
  164. jclass (JNICALL * DefineClass)(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize bufLen);
  165. jclass (JNICALL * FindClass)(JNIEnv *env, const char *name);
  166. jmethodID (JNICALL * FromReflectedMethod)(JNIEnv *env, jobject method);
  167. jfieldID (JNICALL * FromReflectedField)(JNIEnv *env, jobject field);
  168. jobject (JNICALL * ToReflectedMethod)(JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
  169. jclass (JNICALL * GetSuperclass)(JNIEnv *env, jclass clazz);
  170. jboolean (JNICALL * IsAssignableFrom)(JNIEnv *env, jclass clazz1, jclass clazz2);
  171. jobject (JNICALL * ToReflectedField)(JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
  172. jint (JNICALL * Throw)(JNIEnv *env, jthrowable obj);
  173. jint (JNICALL * ThrowNew)(JNIEnv *env, jclass clazz, const char *message);
  174. jthrowable (JNICALL * ExceptionOccurred)(JNIEnv *env);
  175. void (JNICALL * ExceptionDescribe)(JNIEnv *env);
  176. void (JNICALL * ExceptionClear)(JNIEnv *env);
  177. void (JNICALL * FatalError)(JNIEnv *env, const char *msg);
  178. jint (JNICALL * PushLocalFrame)(JNIEnv *env, jint capacity);
  179. jobject (JNICALL * PopLocalFrame)(JNIEnv *env, jobject result);
  180. jobject (JNICALL * NewGlobalRef)(JNIEnv *env, jobject obj);
  181. void (JNICALL * DeleteGlobalRef)(JNIEnv *env, jobject gref);
  182. void (JNICALL * DeleteLocalRef)(JNIEnv *env, jobject localRef);
  183. jboolean (JNICALL * IsSameObject)(JNIEnv *env, jobject ref1, jobject ref2);
  184. jobject (JNICALL * NewLocalRef)(JNIEnv *env, jobject ref);
  185. jint (JNICALL * EnsureLocalCapacity)(JNIEnv *env, jint capacity);
  186. jobject (JNICALL * AllocObject)(JNIEnv *env, jclass clazz);
  187. jobject (JNICALL * NewObject)(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  188. jobject (JNICALL * NewObjectV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  189. jobject (JNICALL * NewObjectA)(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  190. jclass (JNICALL * GetObjectClass)(JNIEnv *env, jobject obj);
  191. jboolean (JNICALL * IsInstanceOf)(JNIEnv *env, jobject obj, jclass clazz);
  192. jmethodID (JNICALL * GetMethodID)(JNIEnv *env, jclass clazz, const char *name, const char *sig);
  193. jobject (JNICALL * CallObjectMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...);
  194. jobject (JNICALL * CallObjectMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  195. jobject (JNICALL * CallObjectMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
  196. jboolean (JNICALL * CallBooleanMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...);
  197. jboolean (JNICALL * CallBooleanMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  198. jboolean (JNICALL * CallBooleanMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
  199. jbyte (JNICALL * CallByteMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...);
  200. jbyte (JNICALL * CallByteMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  201. jbyte (JNICALL * CallByteMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  202. jchar (JNICALL * CallCharMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...);
  203. jchar (JNICALL * CallCharMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  204. jchar (JNICALL * CallCharMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  205. jshort (JNICALL * CallShortMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...);
  206. jshort (JNICALL * CallShortMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  207. jshort (JNICALL * CallShortMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  208. jint (JNICALL * CallIntMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...);
  209. jint (JNICALL * CallIntMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  210. jint (JNICALL * CallIntMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  211. jlong (JNICALL * CallLongMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...);
  212. jlong (JNICALL * CallLongMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  213. jlong (JNICALL * CallLongMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  214. jfloat (JNICALL * CallFloatMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...);
  215. jfloat (JNICALL * CallFloatMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  216. jfloat (JNICALL * CallFloatMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  217. jdouble (JNICALL * CallDoubleMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...);
  218. jdouble (JNICALL * CallDoubleMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  219. jdouble (JNICALL * CallDoubleMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  220. void (JNICALL * CallVoidMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...);
  221. void (JNICALL * CallVoidMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  222. void (JNICALL * CallVoidMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
  223. jobject (JNICALL * CallNonvirtualObjectMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  224. jobject (JNICALL * CallNonvirtualObjectMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args);
  225. jobject (JNICALL * CallNonvirtualObjectMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue * args);
  226. jboolean (JNICALL * CallNonvirtualBooleanMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  227. jboolean (JNICALL * CallNonvirtualBooleanMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args);
  228. jboolean (JNICALL * CallNonvirtualBooleanMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue * args);
  229. jbyte (JNICALL * CallNonvirtualByteMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  230. jbyte (JNICALL * CallNonvirtualByteMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args);
  231. jbyte (JNICALL * CallNonvirtualByteMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
  232. jchar (JNICALL * CallNonvirtualCharMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  233. jchar (JNICALL * CallNonvirtualCharMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args);
  234. jchar (JNICALL * CallNonvirtualCharMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
  235. jshort (JNICALL * CallNonvirtualShortMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  236. jshort (JNICALL * CallNonvirtualShortMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args);
  237. jshort (JNICALL * CallNonvirtualShortMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
  238. jint (JNICALL * CallNonvirtualIntMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  239. jint (JNICALL * CallNonvirtualIntMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args);
  240. jint (JNICALL * CallNonvirtualIntMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
  241. jlong (JNICALL * CallNonvirtualLongMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  242. jlong (JNICALL * CallNonvirtualLongMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args);
  243. jlong (JNICALL * CallNonvirtualLongMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
  244. jfloat (JNICALL * CallNonvirtualFloatMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  245. jfloat (JNICALL * CallNonvirtualFloatMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args);
  246. jfloat (JNICALL * CallNonvirtualFloatMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
  247. jdouble (JNICALL * CallNonvirtualDoubleMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  248. jdouble (JNICALL * CallNonvirtualDoubleMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args);
  249. jdouble (JNICALL * CallNonvirtualDoubleMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
  250. void (JNICALL * CallNonvirtualVoidMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  251. void (JNICALL * CallNonvirtualVoidMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args);
  252. void (JNICALL * CallNonvirtualVoidMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue * args);
  253. jfieldID (JNICALL * GetFieldID)(JNIEnv *env, jclass clazz, const char *name, const char *sig);
  254. jobject (JNICALL * GetObjectField)(JNIEnv *env, jobject obj, jfieldID fieldID);
  255. jboolean (JNICALL * GetBooleanField)(JNIEnv *env, jobject obj, jfieldID fieldID);
  256. jbyte (JNICALL * GetByteField)(JNIEnv *env, jobject obj, jfieldID fieldID);
  257. jchar (JNICALL * GetCharField)(JNIEnv *env, jobject obj, jfieldID fieldID);
  258. jshort (JNICALL * GetShortField)(JNIEnv *env, jobject obj, jfieldID fieldID);
  259. jint (JNICALL * GetIntField)(JNIEnv *env, jobject obj, jfieldID fieldID);
  260. jlong (JNICALL * GetLongField)(JNIEnv *env, jobject obj, jfieldID fieldID);
  261. jfloat (JNICALL * GetFloatField)(JNIEnv *env, jobject obj, jfieldID fieldID);
  262. jdouble (JNICALL * GetDoubleField)(JNIEnv *env, jobject obj, jfieldID fieldID);
  263. void (JNICALL * SetObjectField)(JNIEnv *env, jobject obj, jfieldID fieldID, jobject value);
  264. void (JNICALL * SetBooleanField)(JNIEnv *env, jobject obj, jfieldID fieldID, jboolean value);
  265. void (JNICALL * SetByteField)(JNIEnv *env, jobject obj, jfieldID fieldID, jbyte value);
  266. void (JNICALL * SetCharField)(JNIEnv *env, jobject obj, jfieldID fieldID, jchar value);
  267. void (JNICALL * SetShortField)(JNIEnv *env, jobject obj, jfieldID fieldID, jshort value);
  268. void (JNICALL * SetIntField)(JNIEnv *env, jobject obj, jfieldID fieldID, jint value);
  269. void (JNICALL * SetLongField)(JNIEnv *env, jobject obj, jfieldID fieldID, jlong value);
  270. void (JNICALL * SetFloatField)(JNIEnv *env, jobject obj, jfieldID fieldID, jfloat value);
  271. void (JNICALL * SetDoubleField)(JNIEnv *env, jobject obj, jfieldID fieldID, jdouble value);
  272. jmethodID (JNICALL * GetStaticMethodID)(JNIEnv *env, jclass clazz, const char *name, const char *sig);
  273. jobject (JNICALL * CallStaticObjectMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  274. jobject (JNICALL * CallStaticObjectMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  275. jobject (JNICALL * CallStaticObjectMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  276. jboolean (JNICALL * CallStaticBooleanMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  277. jboolean (JNICALL * CallStaticBooleanMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  278. jboolean (JNICALL * CallStaticBooleanMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  279. jbyte (JNICALL * CallStaticByteMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  280. jbyte (JNICALL * CallStaticByteMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  281. jbyte (JNICALL * CallStaticByteMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  282. jchar (JNICALL * CallStaticCharMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  283. jchar (JNICALL * CallStaticCharMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  284. jchar (JNICALL * CallStaticCharMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  285. jshort (JNICALL * CallStaticShortMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  286. jshort (JNICALL * CallStaticShortMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  287. jshort (JNICALL * CallStaticShortMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  288. jint (JNICALL * CallStaticIntMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  289. jint (JNICALL * CallStaticIntMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  290. jint (JNICALL * CallStaticIntMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  291. jlong (JNICALL * CallStaticLongMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  292. jlong (JNICALL * CallStaticLongMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  293. jlong (JNICALL * CallStaticLongMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  294. jfloat (JNICALL * CallStaticFloatMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  295. jfloat (JNICALL * CallStaticFloatMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  296. jfloat (JNICALL * CallStaticFloatMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  297. jdouble (JNICALL * CallStaticDoubleMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  298. jdouble (JNICALL * CallStaticDoubleMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  299. jdouble (JNICALL * CallStaticDoubleMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  300. void (JNICALL * CallStaticVoidMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  301. void (JNICALL * CallStaticVoidMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  302. void (JNICALL * CallStaticVoidMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue * args);
  303. jfieldID (JNICALL * GetStaticFieldID)(JNIEnv *env, jclass clazz, const char *name, const char *sig);
  304. jobject (JNICALL * GetStaticObjectField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
  305. jboolean (JNICALL * GetStaticBooleanField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
  306. jbyte (JNICALL * GetStaticByteField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
  307. jchar (JNICALL * GetStaticCharField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
  308. jshort (JNICALL * GetStaticShortField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
  309. jint (JNICALL * GetStaticIntField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
  310. jlong (JNICALL * GetStaticLongField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
  311. jfloat (JNICALL * GetStaticFloatField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
  312. jdouble (JNICALL * GetStaticDoubleField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
  313. void (JNICALL * SetStaticObjectField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
  314. void (JNICALL * SetStaticBooleanField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
  315. void (JNICALL * SetStaticByteField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
  316. void (JNICALL * SetStaticCharField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
  317. void (JNICALL * SetStaticShortField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
  318. void (JNICALL * SetStaticIntField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
  319. void (JNICALL * SetStaticLongField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
  320. void (JNICALL * SetStaticFloatField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
  321. void (JNICALL * SetStaticDoubleField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
  322. jstring (JNICALL * NewString)(JNIEnv *env, const jchar *unicodeChars, jsize len);
  323. jsize (JNICALL * GetStringLength)(JNIEnv *env, jstring string);
  324. const jchar *(JNICALL * GetStringChars)(JNIEnv *env, jstring string, jboolean *isCopy);
  325. void (JNICALL * ReleaseStringChars)(JNIEnv *env, jstring string, const jchar *utf);
  326. jstring (JNICALL * NewStringUTF)(JNIEnv *env, const char *bytes);
  327. jsize (JNICALL * GetStringUTFLength)(JNIEnv *env, jstring string);
  328. const char* (JNICALL * GetStringUTFChars)(JNIEnv *env, jstring string, jboolean *isCopy);
  329. void (JNICALL * ReleaseStringUTFChars)(JNIEnv *env, jstring string, const char* utf);
  330. jsize (JNICALL * GetArrayLength)(JNIEnv *env, jarray array);
  331. jobjectArray (JNICALL * NewObjectArray)(JNIEnv *env, jsize length, jclass clazz, jobject initialElement);
  332. jobject (JNICALL * GetObjectArrayElement)(JNIEnv *env, jobjectArray array, jsize index);
  333. void (JNICALL * SetObjectArrayElement)(JNIEnv *env, jobjectArray array, jsize index, jobject value);
  334. jbooleanArray (JNICALL * NewBooleanArray)(JNIEnv *env, jsize length);
  335. jbyteArray (JNICALL * NewByteArray)(JNIEnv *env, jsize length);
  336. jcharArray (JNICALL * NewCharArray)(JNIEnv *env, jsize length);
  337. jshortArray (JNICALL * NewShortArray)(JNIEnv *env, jsize length);
  338. jintArray (JNICALL * NewIntArray)(JNIEnv *env, jsize length);
  339. jlongArray (JNICALL * NewLongArray)(JNIEnv *env, jsize length);
  340. jfloatArray (JNICALL * NewFloatArray)(JNIEnv *env, jsize length);
  341. jdoubleArray (JNICALL * NewDoubleArray)(JNIEnv *env, jsize length);
  342. jboolean * (JNICALL * GetBooleanArrayElements)(JNIEnv *env, jbooleanArray array, jboolean *isCopy);
  343. jbyte * (JNICALL * GetByteArrayElements)(JNIEnv *env, jbyteArray array, jboolean *isCopy);
  344. jchar * (JNICALL * GetCharArrayElements)(JNIEnv *env, jcharArray array, jboolean *isCopy);
  345. jshort * (JNICALL * GetShortArrayElements)(JNIEnv *env, jshortArray array, jboolean *isCopy);
  346. jint * (JNICALL * GetIntArrayElements)(JNIEnv *env, jintArray array, jboolean *isCopy);
  347. jlong * (JNICALL * GetLongArrayElements)(JNIEnv *env, jlongArray array, jboolean *isCopy);
  348. jfloat * (JNICALL * GetFloatArrayElements)(JNIEnv *env, jfloatArray array, jboolean *isCopy);
  349. jdouble * (JNICALL * GetDoubleArrayElements)(JNIEnv *env, jdoubleArray array, jboolean *isCopy);
  350. void (JNICALL * ReleaseBooleanArrayElements)(JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
  351. void (JNICALL * ReleaseByteArrayElements)(JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
  352. void (JNICALL * ReleaseCharArrayElements)(JNIEnv *env, jcharArray array, jchar *elems, jint mode);
  353. void (JNICALL * ReleaseShortArrayElements)(JNIEnv *env, jshortArray array, jshort *elems, jint mode);
  354. void (JNICALL * ReleaseIntArrayElements)(JNIEnv *env, jintArray array, jint *elems, jint mode);
  355. void (JNICALL * ReleaseLongArrayElements)(JNIEnv *env, jlongArray array, jlong *elems, jint mode);
  356. void (JNICALL * ReleaseFloatArrayElements)(JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
  357. void (JNICALL * ReleaseDoubleArrayElements)(JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
  358. void (JNICALL * GetBooleanArrayRegion)(JNIEnv *env, jbooleanArray array, jsize start, jsize len, jboolean *buf);
  359. void (JNICALL * GetByteArrayRegion)(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
  360. void (JNICALL * GetCharArrayRegion)(JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
  361. void (JNICALL * GetShortArrayRegion)(JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
  362. void (JNICALL * GetIntArrayRegion)(JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
  363. void (JNICALL * GetLongArrayRegion)(JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
  364. void (JNICALL * GetFloatArrayRegion)(JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
  365. void (JNICALL * GetDoubleArrayRegion)(JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
  366. void (JNICALL * SetBooleanArrayRegion)(JNIEnv *env, jbooleanArray array, jsize start, jsize len, jboolean *buf);
  367. void (JNICALL * SetByteArrayRegion)(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
  368. void (JNICALL * SetCharArrayRegion)(JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
  369. void (JNICALL * SetShortArrayRegion)(JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
  370. void (JNICALL * SetIntArrayRegion)(JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
  371. void (JNICALL * SetLongArrayRegion)(JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
  372. void (JNICALL * SetFloatArrayRegion)(JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
  373. void (JNICALL * SetDoubleArrayRegion)(JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
  374. jint (JNICALL * RegisterNatives)(JNIEnv *env, jclass clazz, const JNINativeMethod *methods, jint nMethods);
  375. jint (JNICALL * UnregisterNatives)(JNIEnv *env, jclass clazz);
  376. jint (JNICALL * MonitorEnter)(JNIEnv *env, jobject obj);
  377. jint (JNICALL * MonitorExit)(JNIEnv *env, jobject obj);
  378. jint (JNICALL * GetJavaVM)(JNIEnv *env, JavaVM **vm);
  379. void (JNICALL * GetStringRegion)(JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
  380. void (JNICALL * GetStringUTFRegion)(JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
  381. void * (JNICALL * GetPrimitiveArrayCritical)(JNIEnv *env, jarray array, jboolean *isCopy);
  382. void (JNICALL * ReleasePrimitiveArrayCritical)(JNIEnv *env, jarray array, void *carray, jint mode);
  383. const jchar * (JNICALL * GetStringCritical)(JNIEnv *env, jstring string, jboolean *isCopy);
  384. void (JNICALL * ReleaseStringCritical)(JNIEnv *env, jstring string, const jchar *carray);
  385. jweak (JNICALL * NewWeakGlobalRef)(JNIEnv *env, jobject obj);
  386. void (JNICALL * DeleteWeakGlobalRef)(JNIEnv *env, jweak obj);
  387. jboolean (JNICALL * ExceptionCheck)(JNIEnv *env);
  388. jobject (JNICALL * NewDirectByteBuffer)(JNIEnv *env, void *address, jlong capacity);
  389. void * (JNICALL * GetDirectBufferAddress)(JNIEnv *env, jobject buf);
  390. jlong (JNICALL * GetDirectBufferCapacity)(JNIEnv *env, jobject buf);
  391. jobjectRefType (JNICALL * GetObjectRefType)(JNIEnv* env, jobject obj);
  392. };
  393. struct JNIEnv_ {
  394. const struct JNINativeInterface_ *functions;
  395. void *reserved0;
  396. void *reserved1[6];
  397. #ifdef __cplusplus
  398. jint GetVersion() { return functions->GetVersion(this); }
  399. jclass DefineClass(const char *name, jobject loader, const jbyte *buf, jsize bufLen) { return functions->DefineClass(this, name, loader, buf, bufLen); }
  400. jclass FindClass(const char *name) { return functions->FindClass(this, name); }
  401. jmethodID FromReflectedMethod(jobject method) { return functions->FromReflectedMethod(this, method); }
  402. jfieldID FromReflectedField(jobject field) { return functions->FromReflectedField(this, field); }
  403. jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) { return functions->ToReflectedMethod(this, cls, methodID, isStatic); }
  404. jclass GetSuperclass(jclass clazz) { return functions->GetSuperclass(this, clazz); }
  405. jboolean IsAssignableFrom(jclass clazz1, jclass clazz2) { return functions->IsAssignableFrom(this, clazz1, clazz2); }
  406. jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) { return functions->ToReflectedField(this, cls, fieldID, isStatic); }
  407. jint Throw(jthrowable obj) { return functions->Throw(this, obj); }
  408. jint ThrowNew(jclass clazz, const char *message) { return functions->ThrowNew(this, clazz, message); }
  409. jthrowable ExceptionOccurred() { return functions->ExceptionOccurred(this); }
  410. void ExceptionDescribe() { functions->ExceptionDescribe(this); }
  411. void ExceptionClear() { functions->ExceptionClear(this); }
  412. void FatalError(const char *msg) { functions->FatalError(this, msg); }
  413. jint PushLocalFrame(jint capacity) { return functions->PushLocalFrame(this, capacity); }
  414. jobject PopLocalFrame(jobject result) { return functions->PopLocalFrame(this, result); }
  415. jobject NewGlobalRef(jobject obj) { return functions->NewGlobalRef(this, obj); }
  416. void DeleteGlobalRef(jobject gref) { functions->DeleteGlobalRef(this, gref); }
  417. void DeleteLocalRef(jobject localRef) { functions->DeleteLocalRef(this, localRef); }
  418. jboolean IsSameObject(jobject ref1, jobject ref2) { return functions->IsSameObject(this, ref1, ref2); }
  419. jobject NewLocalRef(jobject ref) { return functions->NewLocalRef(this, ref); }
  420. jint EnsureLocalCapacity(jint capacity) { return functions->EnsureLocalCapacity(this, capacity); }
  421. jobject AllocObject(jclass clazz) { return functions->AllocObject(this, clazz); }
  422. jobject NewObject(jclass clazz, jmethodID methodID, ...) { jobject retval; va_list parms; va_start(parms, methodID); retval = functions->NewObjectV(this, clazz, methodID, parms); va_end(parms); return retval; }
  423. jobject NewObjectV(jclass clazz, jmethodID methodID, va_list args) { return functions->NewObjectV(this, clazz, methodID, args); }
  424. jobject NewObjectA(jclass clazz, jmethodID methodID, jvalue *args) { return functions->NewObjectA(this, clazz, methodID, args); }
  425. jclass GetObjectClass(jobject obj) { return functions->GetObjectClass(this, obj); }
  426. jboolean IsInstanceOf(jobject obj, jclass clazz) { return functions->IsInstanceOf(this, obj, clazz); }
  427. jmethodID GetMethodID(jclass clazz, const char *name, const char *sig) { return functions->GetMethodID(this, clazz, name, sig); }
  428. jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) { jobject retval; va_list parms; va_start(parms, methodID); retval = functions->CallObjectMethodV(this, obj, methodID, parms); va_end(parms); return retval; }
  429. jobject CallObjectMethodV(jobject obj, jmethodID methodID, va_list args) { return functions->CallObjectMethodV(this, obj, methodID, args); }
  430. jobject CallObjectMethodA(jobject obj, jmethodID methodID, jvalue * args) { return functions->CallObjectMethodA(this, obj, methodID, args); }
  431. jboolean CallBooleanMethod(jobject obj, jmethodID methodID, ...) { jboolean retval; va_list parms; va_start(parms, methodID); retval = functions->CallBooleanMethodV(this, obj, methodID, parms); va_end(parms); return retval; }
  432. jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, va_list args) { return functions->CallBooleanMethodV(this, obj, methodID, args); }
  433. jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, jvalue * args) { return functions->CallBooleanMethodA(this, obj, methodID, args); }
  434. jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) { jbyte retval; va_list parms; va_start(parms, methodID); retval = functions->CallByteMethodV(this, obj, methodID, parms); va_end(parms); return retval; }
  435. jbyte CallByteMethodV(jobject obj, jmethodID methodID, va_list args) { return functions->CallByteMethodV(this, obj, methodID, args); }
  436. jbyte CallByteMethodA(jobject obj, jmethodID methodID, jvalue *args) { return functions->CallByteMethodA(this, obj, methodID, args); }
  437. jchar CallCharMethod(jobject obj, jmethodID methodID, ...) { jchar retval; va_list parms; va_start(parms, methodID); retval = functions->CallCharMethodV(this, obj, methodID, parms); va_end(parms); return retval; }
  438. jchar CallCharMethodV(jobject obj, jmethodID methodID, va_list args) { return functions->CallCharMethodV(this, obj, methodID, args); }
  439. jchar CallCharMethodA(jobject obj, jmethodID methodID, jvalue *args) { return functions->CallCharMethodA(this, obj, methodID, args); }
  440. jshort CallShortMethod(jobject obj, jmethodID methodID, ...) { jshort retval; va_list parms; va_start(parms, methodID); retval = functions->CallShortMethodV(this, obj, methodID, parms); va_end(parms); return retval; }
  441. jshort CallShortMethodV(jobject obj, jmethodID methodID, va_list args) { return functions->CallShortMethodV(this, obj, methodID, args); }
  442. jshort CallShortMethodA(jobject obj, jmethodID methodID, jvalue *args) { return functions->CallShortMethodA(this, obj, methodID, args); }
  443. jint CallIntMethod(jobject obj, jmethodID methodID, ...) { jint retval; va_list parms; va_start(parms, methodID); retval = functions->CallIntMethodV(this, obj, methodID, parms); va_end(parms); return retval; }
  444. jint CallIntMethodV(jobject obj, jmethodID methodID, va_list args) { return functions->CallIntMethodV(this, obj, methodID, args); }
  445. jint CallIntMethodA(jobject obj, jmethodID methodID, jvalue *args) { return functions->CallIntMethodA(this, obj, methodID, args); }
  446. jlong CallLongMethod(jobject obj, jmethodID methodID, ...) { jlong retval; va_list parms; va_start(parms, methodID); retval = functions->CallLongMethodV(this, obj, methodID, parms); va_end(parms); return retval; }
  447. jlong CallLongMethodV(jobject obj, jmethodID methodID, va_list args) { return functions->CallLongMethodV(this, obj, methodID, args); }
  448. jlong CallLongMethodA(jobject obj, jmethodID methodID, jvalue *args) { return functions->CallLongMethodA(this, obj, methodID, args); }
  449. jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) { jfloat retval; va_list parms; va_start(parms, methodID); retval = functions->CallFloatMethodV(this, obj, methodID, parms); va_end(parms); return retval; }
  450. jfloat CallFloatMethodV(jobject obj, jmethodID methodID, va_list args) { return functions->CallFloatMethodV(this, obj, methodID, args); }
  451. jfloat CallFloatMethodA(jobject obj, jmethodID methodID, jvalue *args) { return functions->CallFloatMethodA(this, obj, methodID, args); }
  452. jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) { jdouble retval; va_list parms; va_start(parms, methodID); retval = functions->CallDoubleMethodV(this, obj, methodID, parms); va_end(parms); return retval; }
  453. jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, va_list args) { return functions->CallDoubleMethodV(this, obj, methodID, args); }
  454. jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, jvalue *args) { return functions->CallDoubleMethodA(this, obj, methodID, args); }
  455. void CallVoidMethod(jobject obj, jmethodID methodID, ...) { va_list parms; va_start(parms, methodID); functions->CallVoidMethodV(this, obj, methodID, parms); va_end(parms); }
  456. void CallVoidMethodV(jobject obj, jmethodID methodID, va_list args) { functions->CallVoidMethodV(this, obj, methodID, args); }
  457. void CallVoidMethodA(jobject obj, jmethodID methodID, jvalue * args) { functions->CallVoidMethodA(this, obj, methodID, args); }
  458. jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, jmethodID methodID, ...) { jobject retval; va_list parms; va_start(parms, methodID); retval = functions->CallNonvirtualObjectMethodV(this, obj, clazz, methodID, parms); va_end(parms); return retval; }
  459. jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args) { return functions->CallNonvirtualObjectMethodV(this, obj, clazz, methodID, args); }
  460. jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, jmethodID methodID, jvalue * args) { return functions->CallNonvirtualObjectMethodA(this, obj, clazz, methodID, args); }
  461. jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, jmethodID methodID, ...) { jboolean retval; va_list parms; va_start(parms, methodID); retval = functions->CallNonvirtualBooleanMethodV(this, obj, clazz, methodID, parms); va_end(parms); return retval; }
  462. jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args) { return functions->CallNonvirtualBooleanMethodV(this, obj, clazz, methodID, args); }
  463. jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, jmethodID methodID, jvalue * args) { return functions->CallNonvirtualBooleanMethodA(this, obj, clazz, methodID, args); }
  464. jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, jmethodID methodID, ...) { jbyte retval; va_list parms; va_start(parms, methodID); retval = functions->CallNonvirtualByteMethodV(this, obj, clazz, methodID, parms); va_end(parms); return retval; }
  465. jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args) { return functions->CallNonvirtualByteMethodV(this, obj, clazz, methodID, args); }
  466. jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallNonvirtualByteMethodA(this, obj, clazz, methodID, args); }
  467. jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, jmethodID methodID, ...) { jchar retval; va_list parms; va_start(parms, methodID); retval = functions->CallNonvirtualCharMethodV(this, obj, clazz, methodID, parms); va_end(parms); return retval; }
  468. jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args) { return functions->CallNonvirtualCharMethodV(this, obj, clazz, methodID, args); }
  469. jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallNonvirtualCharMethodA(this, obj, clazz, methodID, args); }
  470. jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, jmethodID methodID, ...) { jshort retval; va_list parms; va_start(parms, methodID); retval = functions->CallNonvirtualShortMethodV(this, obj, clazz, methodID, parms); va_end(parms); return retval; }
  471. jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args) { return functions->CallNonvirtualShortMethodV(this, obj, clazz, methodID, args); }
  472. jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallNonvirtualShortMethodA(this, obj, clazz, methodID, args); }
  473. jint CallNonvirtualIntMethod(jobject obj, jclass clazz, jmethodID methodID, ...) { jint retval; va_list parms; va_start(parms, methodID); retval = functions->CallNonvirtualIntMethodV(this, obj, clazz, methodID, parms); va_end(parms); return retval; }
  474. jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args) { return functions->CallNonvirtualIntMethodV(this, obj, clazz, methodID, args); }
  475. jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallNonvirtualIntMethodA(this, obj, clazz, methodID, args); }
  476. jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, jmethodID methodID, ...) { jlong retval; va_list parms; va_start(parms, methodID); retval = functions->CallNonvirtualLongMethodV(this, obj, clazz, methodID, parms); va_end(parms); return retval; }
  477. jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args) { return functions->CallNonvirtualLongMethodV(this, obj, clazz, methodID, args); }
  478. jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallNonvirtualLongMethodA(this, obj, clazz, methodID, args); }
  479. jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, jmethodID methodID, ...) { jfloat retval; va_list parms; va_start(parms, methodID); retval = functions->CallNonvirtualFloatMethodV(this, obj, clazz, methodID, parms); va_end(parms); return retval; }
  480. jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args) { return functions->CallNonvirtualFloatMethodV(this, obj, clazz, methodID, args); }
  481. jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallNonvirtualFloatMethodA(this, obj, clazz, methodID, args); }
  482. jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, jmethodID methodID, ...) { jdouble retval; va_list parms; va_start(parms, methodID); retval = functions->CallNonvirtualDoubleMethodV(this, obj, clazz, methodID, parms); va_end(parms); return retval; }
  483. jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args) { return functions->CallNonvirtualDoubleMethodV(this, obj, clazz, methodID, args); }
  484. jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallNonvirtualDoubleMethodA(this, obj, clazz, methodID, args); }
  485. void CallNonvirtualVoidMethod(jobject obj, jclass clazz, jmethodID methodID, ...) { va_list parms; va_start(parms, methodID); functions->CallNonvirtualVoidMethodV(this, obj, clazz, methodID, parms); va_end(parms); }
  486. void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args) { functions->CallNonvirtualVoidMethodV(this, obj, clazz, methodID, args); }
  487. void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, jmethodID methodID, jvalue * args) { functions->CallNonvirtualVoidMethodA(this, obj, clazz, methodID, args); }
  488. jfieldID GetFieldID(jclass clazz, const char *name, const char *sig) { return functions->GetFieldID(this, clazz, name, sig); }
  489. jobject GetObjectField(jobject obj, jfieldID fieldID) { return functions->GetObjectField(this, obj, fieldID); }
  490. jboolean GetBooleanField(jobject obj, jfieldID fieldID) { return functions->GetBooleanField(this, obj, fieldID); }
  491. jbyte GetByteField(jobject obj, jfieldID fieldID) { return functions->GetByteField(this, obj, fieldID); }
  492. jchar GetCharField(jobject obj, jfieldID fieldID) { return functions->GetCharField(this, obj, fieldID); }
  493. jshort GetShortField(jobject obj, jfieldID fieldID) { return functions->GetShortField(this, obj, fieldID); }
  494. jint GetIntField(jobject obj, jfieldID fieldID) { return functions->GetIntField(this, obj, fieldID); }
  495. jlong GetLongField(jobject obj, jfieldID fieldID) { return functions->GetLongField(this, obj, fieldID); }
  496. jfloat GetFloatField(jobject obj, jfieldID fieldID) { return functions->GetFloatField(this, obj, fieldID); }
  497. jdouble GetDoubleField(jobject obj, jfieldID fieldID) { return functions->GetDoubleField(this, obj, fieldID); }
  498. void SetObjectField(jobject obj, jfieldID fieldID, jobject value) { functions->SetObjectField(this, obj, fieldID, value); }
  499. void SetBooleanField(jobject obj, jfieldID fieldID, jboolean value) { functions->SetBooleanField(this, obj, fieldID, value); }
  500. void SetByteField(jobject obj, jfieldID fieldID, jbyte value) { functions->SetByteField(this, obj, fieldID, value); }
  501. void SetCharField(jobject obj, jfieldID fieldID, jchar value) { functions->SetCharField(this, obj, fieldID, value); }
  502. void SetShortField(jobject obj, jfieldID fieldID, jshort value) { functions->SetShortField(this, obj, fieldID, value); }
  503. void SetIntField(jobject obj, jfieldID fieldID, jint value) { functions->SetIntField(this, obj, fieldID, value); }
  504. void SetLongField(jobject obj, jfieldID fieldID, jlong value) { functions->SetLongField(this, obj, fieldID, value); }
  505. void SetFloatField(jobject obj, jfieldID fieldID, jfloat value) { functions->SetFloatField(this, obj, fieldID, value); }
  506. void SetDoubleField(jobject obj, jfieldID fieldID, jdouble value) { functions->SetDoubleField(this, obj, fieldID, value); }
  507. jmethodID GetStaticMethodID(jclass clazz, const char *name, const char *sig) { return functions->GetStaticMethodID(this, clazz, name, sig); }
  508. jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, ...) { jobject retval; va_list parms; va_start(parms, methodID); retval = functions->CallStaticObjectMethodV(this, clazz, methodID, parms); va_end(parms); return retval; }
  509. jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, va_list args) { return functions->CallStaticObjectMethodV(this, clazz, methodID, args); }
  510. jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallStaticObjectMethodA(this, clazz, methodID, args); }
  511. jboolean CallStaticBooleanMethod(jclass clazz, jmethodID methodID, ...) { jboolean retval; va_list parms; va_start(parms, methodID); retval = functions->CallStaticBooleanMethodV(this, clazz, methodID, parms); va_end(parms); return retval; }
  512. jboolean CallStaticBooleanMethodV(jclass clazz, jmethodID methodID, va_list args) { return functions->CallStaticBooleanMethodV(this, clazz, methodID, args); }
  513. jboolean CallStaticBooleanMethodA(jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallStaticBooleanMethodA(this, clazz, methodID, args); }
  514. jbyte CallStaticByteMethod(jclass clazz, jmethodID methodID, ...) { jbyte retval; va_list parms; va_start(parms, methodID); retval = functions->CallStaticByteMethodV(this, clazz, methodID, parms); va_end(parms); return retval; }
  515. jbyte CallStaticByteMethodV(jclass clazz, jmethodID methodID, va_list args) { return functions->CallStaticByteMethodV(this, clazz, methodID, args); }
  516. jbyte CallStaticByteMethodA(jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallStaticByteMethodA(this, clazz, methodID, args); }
  517. jchar CallStaticCharMethod(jclass clazz, jmethodID methodID, ...) { jchar retval; va_list parms; va_start(parms, methodID); retval = functions->CallStaticCharMethodV(this, clazz, methodID, parms); va_end(parms); return retval; }
  518. jchar CallStaticCharMethodV(jclass clazz, jmethodID methodID, va_list args) { return functions->CallStaticCharMethodV(this, clazz, methodID, args); }
  519. jchar CallStaticCharMethodA(jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallStaticCharMethodA(this, clazz, methodID, args); }
  520. jshort CallStaticShortMethod(jclass clazz, jmethodID methodID, ...) { jshort retval; va_list parms; va_start(parms, methodID); retval = functions->CallStaticShortMethodV(this, clazz, methodID, parms); va_end(parms); return retval; }
  521. jshort CallStaticShortMethodV(jclass clazz, jmethodID methodID, va_list args) { return functions->CallStaticShortMethodV(this, clazz, methodID, args); }
  522. jshort CallStaticShortMethodA(jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallStaticShortMethodA(this, clazz, methodID, args); }
  523. jint CallStaticIntMethod(jclass clazz, jmethodID methodID, ...) { jint retval; va_list parms; va_start(parms, methodID); retval = functions->CallStaticIntMethodV(this, clazz, methodID, parms); va_end(parms); return retval; }
  524. jint CallStaticIntMethodV(jclass clazz, jmethodID methodID, va_list args) { return functions->CallStaticIntMethodV(this, clazz, methodID, args); }
  525. jint CallStaticIntMethodA(jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallStaticIntMethodA(this, clazz, methodID, args); }
  526. jlong CallStaticLongMethod(jclass clazz, jmethodID methodID, ...) { jlong retval; va_list parms; va_start(parms, methodID); retval = functions->CallStaticLongMethodV(this, clazz, methodID, parms); va_end(parms); return retval; }
  527. jlong CallStaticLongMethodV(jclass clazz, jmethodID methodID, va_list args) { return functions->CallStaticLongMethodV(this, clazz, methodID, args); }
  528. jlong CallStaticLongMethodA(jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallStaticLongMethodA(this, clazz, methodID, args); }
  529. jfloat CallStaticFloatMethod(jclass clazz, jmethodID methodID, ...) { jfloat retval; va_list parms; va_start(parms, methodID); retval = functions->CallStaticFloatMethodV(this, clazz, methodID, parms); va_end(parms); return retval; }
  530. jfloat CallStaticFloatMethodV(jclass clazz, jmethodID methodID, va_list args) { return functions->CallStaticFloatMethodV(this, clazz, methodID, args); }
  531. jfloat CallStaticFloatMethodA(jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallStaticFloatMethodA(this, clazz, methodID, args); }
  532. jdouble CallStaticDoubleMethod(jclass clazz, jmethodID methodID, ...) { jdouble retval; va_list parms; va_start(parms, methodID); retval = functions->CallStaticDoubleMethodV(this, clazz, methodID, parms); va_end(parms); return retval; }
  533. jdouble CallStaticDoubleMethodV(jclass clazz, jmethodID methodID, va_list args) { return functions->CallStaticDoubleMethodV(this, clazz, methodID, args); }
  534. jdouble CallStaticDoubleMethodA(jclass clazz, jmethodID methodID, jvalue *args) { return functions->CallStaticDoubleMethodA(this, clazz, methodID, args); }
  535. void CallStaticVoidMethod(jclass clazz, jmethodID methodID, ...) { va_list parms; va_start(parms, methodID); functions->CallStaticVoidMethodV(this, clazz, methodID, parms); va_end(parms); }
  536. void CallStaticVoidMethodV(jclass clazz, jmethodID methodID, va_list args) { functions->CallStaticVoidMethodV(this, clazz, methodID, args); }
  537. void CallStaticVoidMethodA(jclass clazz, jmethodID methodID, jvalue * args) { functions->CallStaticVoidMethodA(this, clazz, methodID, args); }
  538. jfieldID GetStaticFieldID(jclass clazz, const char *name, const char *sig) { return functions->GetStaticFieldID(this, clazz, name, sig); }
  539. jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) { return functions->GetStaticObjectField(this, clazz, fieldID); }
  540. jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) { return functions->GetStaticBooleanField(this, clazz, fieldID); }
  541. jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) { return functions->GetStaticByteField(this, clazz, fieldID); }
  542. jchar GetStaticCharField(jclass clazz, jfieldID fieldID) { return functions->GetStaticCharField(this, clazz, fieldID); }
  543. jshort GetStaticShortField(jclass clazz, jfieldID fieldID) { return functions->GetStaticShortField(this, clazz, fieldID); }
  544. jint GetStaticIntField(jclass clazz, jfieldID fieldID) { return functions->GetStaticIntField(this, clazz, fieldID); }
  545. jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { return functions->GetStaticLongField(this, clazz, fieldID); }
  546. jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { return functions->GetStaticFloatField(this, clazz, fieldID); }
  547. jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { return functions->GetStaticDoubleField(this, clazz, fieldID); }
  548. void SetStaticObjectField(jclass clazz, jfieldID fieldID, jobject value) { functions->SetStaticObjectField(this, clazz, fieldID, value); }
  549. void SetStaticBooleanField(jclass clazz, jfieldID fieldID, jboolean value) { functions->SetStaticBooleanField(this, clazz, fieldID, value); }
  550. void SetStaticByteField(jclass clazz, jfieldID fieldID, jbyte value) { functions->SetStaticByteField(this, clazz, fieldID, value); }
  551. void SetStaticCharField(jclass clazz, jfieldID fieldID, jchar value) { functions->SetStaticCharField(this, clazz, fieldID, value); }
  552. void SetStaticShortField(jclass clazz, jfieldID fieldID, jshort value) { functions->SetStaticShortField(this, clazz, fieldID, value); }
  553. void SetStaticIntField(jclass clazz, jfieldID fieldID, jint value) { functions->SetStaticIntField(this, clazz, fieldID, value); }
  554. void SetStaticLongField(jclass clazz, jfieldID fieldID, jlong value) { functions->SetStaticLongField(this, clazz, fieldID, value); }
  555. void SetStaticFloatField(jclass clazz, jfieldID fieldID, jfloat value) { functions->SetStaticFloatField(this, clazz, fieldID, value); }
  556. void SetStaticDoubleField(jclass clazz, jfieldID fieldID, jdouble value) { functions->SetStaticDoubleField(this, clazz, fieldID, value); }
  557. jstring NewString(const jchar *unicodeChars, jsize len) { return functions->NewString(this, unicodeChars, len); }
  558. jsize GetStringLength(jstring string) { return functions->GetStringLength(this, string); }
  559. const jchar* GetStringChars(jstring string, jboolean *isCopy) { return functions->GetStringChars(this, string, isCopy); }
  560. void ReleaseStringChars(jstring string, const jchar *utf) { functions->ReleaseStringChars(this, string, utf); }
  561. jstring NewStringUTF(const char *bytes) { return functions->NewStringUTF(this, bytes); }
  562. jsize GetStringUTFLength(jstring string) { return functions->GetStringUTFLength(this, string); }
  563. const char* GetStringUTFChars(jstring string, jboolean *isCopy) { return functions->GetStringUTFChars(this, string, isCopy); }
  564. void ReleaseStringUTFChars(jstring string, const char* utf) { functions->ReleaseStringUTFChars(this, string, utf); }
  565. jsize GetArrayLength(jarray array) { return functions->GetArrayLength(this, array); }
  566. jobjectArray NewObjectArray(jsize length, jclass clazz, jobject initialElement) { return functions->NewObjectArray(this, length, clazz, initialElement); }
  567. jobject GetObjectArrayElement(jobjectArray array, jsize index) { return functions->GetObjectArrayElement(this, array, index); }
  568. void SetObjectArrayElement(jobjectArray array, jsize index, jobject value) { functions->SetObjectArrayElement(this, array, index, value); }
  569. jbooleanArray NewBooleanArray(jsize length) { return functions->NewBooleanArray(this, length); }
  570. jbyteArray NewByteArray(jsize length) { return functions->NewByteArray(this, length); }
  571. jcharArray NewCharArray(jsize length) { return functions->NewCharArray(this, length); }
  572. jshortArray NewShortArray(jsize length) { return functions->NewShortArray(this, length); }
  573. jintArray NewIntArray(jsize length) { return functions->NewIntArray(this, length); }
  574. jlongArray NewLongArray(jsize length) { return functions->NewLongArray(this, length); }
  575. jfloatArray NewFloatArray(jsize length) { return functions->NewFloatArray(this, length); }
  576. jdoubleArray NewDoubleArray(jsize length) { return functions->NewDoubleArray(this, length); }
  577. jboolean* GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) { return functions->GetBooleanArrayElements(this, array, isCopy); }
  578. jbyte* GetByteArrayElements(jbyteArray array, jboolean *isCopy) { return functions->GetByteArrayElements(this, array, isCopy); }
  579. jchar* GetCharArrayElements(jcharArray array, jboolean *isCopy) { return functions->GetCharArrayElements(this, array, isCopy); }
  580. jshort* GetShortArrayElements(jshortArray array, jboolean *isCopy) { return functions->GetShortArrayElements(this, array, isCopy); }
  581. jint* GetIntArrayElements(jintArray array, jboolean *isCopy) { return functions->GetIntArrayElements(this, array, isCopy); }
  582. jlong* GetLongArrayElements(jlongArray array, jboolean *isCopy) { return functions->GetLongArrayElements(this, array, isCopy); }
  583. jfloat* GetFloatArrayElements(jfloatArray array, jboolean *isCopy) { return functions->GetFloatArrayElements(this, array, isCopy); }
  584. jdouble* GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) { return functions->GetDoubleArrayElements(this, array, isCopy); }
  585. void ReleaseBooleanArrayElements(jbooleanArray array, jboolean *elems, jint mode) { functions->ReleaseBooleanArrayElements(this, array, elems, mode); }
  586. void ReleaseByteArrayElements(jbyteArray array, jbyte *elems, jint mode) { functions->ReleaseByteArrayElements(this, array, elems, mode); }
  587. void ReleaseCharArrayElements(jcharArray array, jchar *elems, jint mode) { functions->ReleaseCharArrayElements(this, array, elems, mode); }
  588. void ReleaseShortArrayElements(jshortArray array, jshort *elems, jint mode) { functions->ReleaseShortArrayElements(this, array, elems, mode); }
  589. void ReleaseIntArrayElements(jintArray array, jint *elems, jint mode) { functions->ReleaseIntArrayElements(this, array, elems, mode); }
  590. void ReleaseLongArrayElements(jlongArray array, jlong *elems, jint mode) { functions->ReleaseLongArrayElements(this, array, elems, mode); }
  591. void ReleaseFloatArrayElements(jfloatArray array, jfloat *elems, jint mode) { functions->ReleaseFloatArrayElements(this, array, elems, mode); }
  592. void ReleaseDoubleArrayElements(jdoubleArray array, jdouble *elems, jint mode) { functions->ReleaseDoubleArrayElements(this, array, elems, mode); }
  593. void GetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, jboolean *buf) { functions->GetBooleanArrayRegion(this, array, start, len, buf); }
  594. void GetByteArrayRegion(jbyteArray array, jsize start, jsize len, jbyte *buf) { functions->GetByteArrayRegion(this, array, start, len, buf); }
  595. void GetCharArrayRegion(jcharArray array, jsize start, jsize len, jchar *buf) { functions->GetCharArrayRegion(this, array, start, len, buf); }
  596. void GetShortArrayRegion(jshortArray array, jsize start, jsize len, jshort *buf) { functions->GetShortArrayRegion(this, array, start, len, buf); }
  597. void GetIntArrayRegion(jintArray array, jsize start, jsize len, jint *buf) { functions->GetIntArrayRegion(this, array, start, len, buf); }
  598. void GetLongArrayRegion(jlongArray array, jsize start, jsize len, jlong *buf) { functions->GetLongArrayRegion(this, array, start, len, buf); }
  599. void GetFloatArrayRegion(jfloatArray array, jsize start, jsize len, jfloat *buf) { functions->GetFloatArrayRegion(this, array, start, len, buf); }
  600. void GetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, jdouble *buf) { functions->GetDoubleArrayRegion(this, array, start, len, buf); }
  601. void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, jboolean *buf) { functions->SetBooleanArrayRegion(this, array, start, len, buf); }
  602. void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, jbyte *buf) { functions->SetByteArrayRegion(this, array, start, len, buf); }
  603. void SetCharArrayRegion(jcharArray array, jsize start, jsize len, jchar *buf) { functions->SetCharArrayRegion(this, array, start, len, buf); }
  604. void SetShortArrayRegion(jshortArray array, jsize start, jsize len, jshort *buf) { functions->SetShortArrayRegion(this, array, start, len, buf); }
  605. void SetIntArrayRegion(jintArray array, jsize start, jsize len, jint *buf) { functions->SetIntArrayRegion(this, array, start, len, buf); }
  606. void SetLongArrayRegion(jlongArray array, jsize start, jsize len, jlong *buf) { functions->SetLongArrayRegion(this, array, start, len, buf); }
  607. void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, jfloat *buf) { functions->SetFloatArrayRegion(this, array, start, len, buf); }
  608. void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, jdouble *buf) { functions->SetDoubleArrayRegion(this, array, start, len, buf); }
  609. jint RegisterNatives(jclass clazz, const JNINativeMethod *methods, jint nMethods) { return functions->RegisterNatives(this, clazz, methods, nMethods); }
  610. jint UnregisterNatives(jclass clazz) { return functions->UnregisterNatives(this, clazz); }
  611. jint MonitorEnter(jobject obj) { return functions->MonitorEnter(this, obj); }
  612. jint MonitorExit(jobject obj) { return functions->MonitorExit(this, obj); }
  613. jint GetJavaVM(JavaVM **vm) { return functions->GetJavaVM(this, vm); }
  614. void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) { functions->GetStringRegion(this, str, start, len, buf); }
  615. void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) { functions->GetStringUTFRegion(this, str, start, len, buf); }
  616. void* GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) { return functions->GetPrimitiveArrayCritical(this, array, isCopy); }
  617. void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) { functions->ReleasePrimitiveArrayCritical(this, array, carray, mode); }
  618. const jchar* GetStringCritical(jstring string, jboolean *isCopy) { return functions->GetStringCritical(this, string, isCopy); }
  619. void ReleaseStringCritical(jstring string, const jchar *carray) { functions->ReleaseStringCritical(this, string, carray); }
  620. jweak NewWeakGlobalRef(jobject obj) { return functions->NewWeakGlobalRef(this, obj); }
  621. void DeleteWeakGlobalRef(jweak obj) { functions->DeleteWeakGlobalRef(this, obj); }
  622. jboolean ExceptionCheck() { return functions->ExceptionCheck(this); }
  623. jobject NewDirectByteBuffer(void *address, jlong capacity) { return functions->NewDirectByteBuffer(this, address, capacity); }
  624. void* GetDirectBufferAddress(jobject buf) { return functions->GetDirectBufferAddress(this, buf); }
  625. jlong GetDirectBufferCapacity(jobject buf) { return functions->GetDirectBufferCapacity(this, buf); }
  626. jobjectRefType GetObjectRefType(jobject obj) { return functions->GetObjectRefType(this, obj); }
  627. #endif
  628. };
  629. /* 1.1 Args */
  630. typedef struct JDK1_1InitArgs {
  631. jint version;
  632. char **properties;
  633. jint checkSource;
  634. jint nativeStackSize;
  635. jint javaStackSize;
  636. jint minHeapSize;
  637. jint maxHeapSize;
  638. jint verifyMode;
  639. const char *classpath;
  640. jint (JNICALL * vfprintf)(FILE *fp, const char *format, va_list args);
  641. void (JNICALL * exit)(jint code);
  642. void (JNICALL * abort)(void);
  643. jint enableClassGC;
  644. jint enableVerboseGC;
  645. jint disableAsyncGC;
  646. jint verbose;
  647. jint debugAgent;
  648. jint debugPort;
  649. } JDK1_1InitArgs;
  650. typedef struct JDK1_1AttachArgs {
  651. void * __padding; /* C compilers don't allow empty structures. */
  652. } JDK1_1AttachArgs;
  653. /* 1.2 args */
  654. typedef struct JavaVMOption {
  655. char *optionString;
  656. void *extraInfo;
  657. } JavaVMOption;
  658. typedef struct JavaVMInitArgs {
  659. jint version;
  660. jint nOptions;
  661. JavaVMOption *options;
  662. jboolean ignoreUnrecognized;
  663. } JavaVMInitArgs;
  664. typedef struct {
  665. jint version;
  666. char *name;
  667. jobject group;
  668. } JavaVMAttachArgs;
  669. struct JNIInvokeInterface_ {
  670. void *reserved0;
  671. void *reserved1;
  672. void *reserved2;
  673. jint (JNICALL * DestroyJavaVM)(JavaVM *vm);
  674. jint (JNICALL * AttachCurrentThread)(JavaVM *vm, void **penv, void *args);
  675. jint (JNICALL * DetachCurrentThread)(JavaVM *vm);
  676. jint (JNICALL * GetEnv)(JavaVM *vm, void **penv, jint version);
  677. jint (JNICALL * AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args);
  678. };
  679. struct JavaVM_ {
  680. const struct JNIInvokeInterface_ *functions;
  681. void *reserved0;
  682. void *reserved1;
  683. void *reserved2;
  684. #ifdef __cplusplus
  685. jint DestroyJavaVM() { return functions->DestroyJavaVM(this); }
  686. jint AttachCurrentThread(void ** p_env, void * args) { return functions->AttachCurrentThread(this, p_env, args); }
  687. jint DetachCurrentThread() { return functions->DetachCurrentThread(this); }
  688. jint GetEnv(void ** p_env, jint version) { return functions->GetEnv(this, p_env, version); }
  689. jint AttachCurrentThreadAsDaemon(void ** p_env, void * args) { return functions->AttachCurrentThreadAsDaemon(this, p_env, args); }
  690. #endif
  691. };
  692. struct JVMExtensionInterface_ {
  693. char eyecatcher[4];
  694. jint length;
  695. jint version;
  696. jint modification;
  697. JavaVM *vm;
  698. jint (JNICALL * ResetJavaVM)(JavaVM *vm);
  699. jint (JNICALL * QueryJavaVM)(JavaVM *vm, jint nQueries, JavaVMQuery *queries);
  700. jint (JNICALL * QueryGCStatus)(JavaVM *vm, jint *nheaps, GCStatus *status, jint statusSize);
  701. };
  702. struct JVMExt_ {
  703. const struct JVMExtensionInterface_ *functions;
  704. #ifdef __cplusplus
  705. jint ResetJavaVM() {return functions->ResetJavaVM(functions->vm);}
  706. jint QueryJavaVM(jint nQueries, JavaVMQuery *queries) { return functions->QueryJavaVM(functions->vm, nQueries, queries);}
  707. jint QueryGCStatus(jint *nheaps, GCStatus *status, jint statusSize){ return functions->QueryGCStatus(functions->vm, nheaps, status, statusSize); }
  708. #endif
  709. };
  710. #ifdef __cplusplus
  711. typedef JVMExt_ JVMExt;
  712. #else
  713. typedef const struct JVMExtensionInterface_ *JVMExt;
  714. #endif
  715. jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *);
  716. jint JNICALL JNI_CreateJavaVM(JavaVM **, void **, void *);
  717. jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
  718. JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *, void *);
  719. JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *, void *);
  720. #ifdef __cplusplus
  721. }
  722. #endif
  723. #endif /* JNI_H */