1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
| struct JNIEnv_;
typedef JNIEnv_ JNIEnv;
struct JNIEnv_ { const struct JNINativeInterface_ *functions; #ifdef __cplusplus
jint GetVersion() { return functions->GetVersion(this); } jclass DefineClass(const char *name, jobject loader, const jbyte *buf, jsize len) { return functions->DefineClass(this, name, loader, buf, len); } jclass FindClass(const char *name) { return functions->FindClass(this, name); } jmethodID FromReflectedMethod(jobject method) { return functions->FromReflectedMethod(this,method); } jfieldID FromReflectedField(jobject field) { return functions->FromReflectedField(this,field); } jobject NewDirectByteBuffer(void* address, jlong capacity) { return functions->NewDirectByteBuffer(this, address, capacity); } void* GetDirectBufferAddress(jobject buf) { return functions->GetDirectBufferAddress(this, buf); } jlong GetDirectBufferCapacity(jobject buf) { return functions->GetDirectBufferCapacity(this, buf); } jobjectRefType GetObjectRefType(jobject obj) { return functions->GetObjectRefType(this, obj); } }
struct JNINativeInterface_ { void *reserved0; void *reserved1; void *reserved2;
void *reserved3; jint (JNICALL *GetVersion)(JNIEnv *env);
jclass (JNICALL *DefineClass) (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len); jclass (JNICALL *FindClass) (JNIEnv *env, const char *name);
jmethodID (JNICALL *FromReflectedMethod) (JNIEnv *env, jobject method); jfieldID (JNICALL *FromReflectedField) (JNIEnv *env, jobject field);
jobject (JNICALL *NewDirectByteBuffer) (JNIEnv* env, void* address, jlong capacity); void* (JNICALL *GetDirectBufferAddress) (JNIEnv* env, jobject buf); jlong (JNICALL *GetDirectBufferCapacity) (JNIEnv* env, jobject buf);
jobjectRefType (JNICALL *GetObjectRefType) (JNIEnv* env, jobject obj); }
|