Jni函数

接口函数表

  • 每个函数都可以访问通过JNIEnv参数在一个固定的偏移量。JNIEnv类型是一个指向结构的指针存储所有JNI函数指针。这是定义如下:
  • typedef const struct JNINativeInterface *JNIEnv;
  • ,函数表之间可以共享所有JNI接口指针。
    • const struct JNINativeInterface ... = { 
      NULL,
      NULL,
      NULL,
      NULL,
      GetVersion,
      DefineClass,
      FindClass,
      FromReflectedMethod,
      FromReflectedField,
      ToReflectedMethod,
      GetSuperclass,
      IsAssignableFrom,
      ToReflectedField,
      Throw,
      ThrowNew,
      ExceptionOccurred,
      ExceptionDescribe,
      ExceptionClear,
      FatalError,
      PushLocalFrame,
      PopLocalFrame,
      NewGlobalRef,
      DeleteGlobalRef,
      DeleteLocalRef,
      IsSameObject,
      NewLocalRef,
      EnsureLocalCapacity,
      AllocObject,
      NewObject,
      NewObjectV,
      NewObjectA,
      GetObjectClass,
      IsInstanceOf,
      GetMethodID,
      CallObjectMethod,
      CallObjectMethodV,
      CallObjectMethodA,
      CallBooleanMethod,
      CallBooleanMethodV,
      CallBooleanMethodA,
      CallByteMethod,
      CallByteMethodV,
      CallByteMethodA,
      CallCharMethod,
      CallCharMethodV,
      CallCharMethodA,
      CallShortMethod,
      CallShortMethodV,
      CallShortMethodA,
      CallIntMethod,
      CallIntMethodV,
      CallIntMethodA,
      CallLongMethod,
      CallLongMethodV,
      CallLongMethodA,
      CallFloatMethod,
      CallFloatMethodV,
      CallFloatMethodA,
      CallDoubleMethod,
      CallDoubleMethodV,
      CallDoubleMethodA,
      CallVoidMethod,
      CallVoidMethodV,
      CallVoidMethodA,
      CallNonvirtualObjectMethod,
      CallNonvirtualObjectMethodV,
      CallNonvirtualObjectMethodA,
      CallNonvirtualBooleanMethod,
      CallNonvirtualBooleanMethodV,
      CallNonvirtualBooleanMethodA,
      CallNonvirtualByteMethod,
      CallNonvirtualByteMethodV,
      CallNonvirtualByteMethodA,
      CallNonvirtualCharMethod,
      CallNonvirtualCharMethodV,
      CallNonvirtualCharMethodA,
      CallNonvirtualShortMethod,
      CallNonvirtualShortMethodV,
      CallNonvirtualShortMethodA,
      CallNonvirtualIntMethod,
      CallNonvirtualIntMethodV,
      CallNonvirtualIntMethodA,
      CallNonvirtualLongMethod,
      CallNonvirtualLongMethodV,
      CallNonvirtualLongMethodA,
      CallNonvirtualFloatMethod,
      CallNonvirtualFloatMethodV,
      CallNonvirtualFloatMethodA,
      CallNonvirtualDoubleMethod,
      CallNonvirtualDoubleMethodV,
      CallNonvirtualDoubleMethodA,
      CallNonvirtualVoidMethod,
      CallNonvirtualVoidMethodV,
      CallNonvirtualVoidMethodA,
      GetFieldID,
      GetObjectField,
      GetBooleanField,
      GetByteField,
      GetCharField,
      GetShortField,
      GetIntField,
      GetLongField,
      GetFloatField,
      GetDoubleField,
      SetObjectField,
      SetBooleanField,
      SetByteField,
      SetCharField,
      SetShortField,
      SetIntField,
      SetLongField,
      SetFloatField,
      SetDoubleField,
      GetStaticMethodID,
      CallStaticObjectMethod,
      CallStaticObjectMethodV,
      CallStaticObjectMethodA,
      CallStaticBooleanMethod,
      CallStaticBooleanMethodV,
      CallStaticBooleanMethodA,
      CallStaticByteMethod,
      CallStaticByteMethodV,
      CallStaticByteMethodA,
      CallStaticCharMethod,
      CallStaticCharMethodV,
      CallStaticCharMethodA,
      CallStaticShortMethod,
      CallStaticShortMethodV,
      CallStaticShortMethodA,
      CallStaticIntMethod,
      CallStaticIntMethodV,
      CallStaticIntMethodA,
      CallStaticLongMethod,
      CallStaticLongMethodV,
      CallStaticLongMethodA,
      CallStaticFloatMethod,
      CallStaticFloatMethodV,
      CallStaticFloatMethodA,
      CallStaticDoubleMethod,
      CallStaticDoubleMethodV,
      CallStaticDoubleMethodA,
      CallStaticVoidMethod,
      CallStaticVoidMethodV,
      CallStaticVoidMethodA,
      GetStaticFieldID,
      GetStaticObjectField,
      GetStaticBooleanField,
      GetStaticByteField,
      GetStaticCharField,
      GetStaticShortField,
      GetStaticIntField,
      GetStaticLongField,
      GetStaticFloatField,
      GetStaticDoubleField,
      SetStaticObjectField,
      SetStaticBooleanField,
      SetStaticByteField,
      SetStaticCharField,
      SetStaticShortField,
      SetStaticIntField,
      SetStaticLongField,
      SetStaticFloatField,
      SetStaticDoubleField,
      NewString,
      GetStringLength,
      GetStringChars,
      ReleaseStringChars,
      NewStringUTF,
      GetStringUTFLength,
      GetStringUTFChars,
      ReleaseStringUTFChars,
      GetArrayLength,
      NewObjectArray,
      GetObjectArrayElement,
      SetObjectArrayElement,
      NewBooleanArray,
      NewByteArray,
      NewCharArray,
      NewShortArray,
      NewIntArray,
      NewLongArray,
      NewFloatArray,
      NewDoubleArray
      GetBooleanArrayElements,
      GetByteArrayElements,
      GetCharArrayElements,
      GetShortArrayElements,
      GetIntArrayElements,
      GetLongArrayElements,
      GetFloatArrayElements,
      GetDoubleArrayElements,
      ReleaseBooleanArrayElements,
      ReleaseByteArrayElements,
      ReleaseCharArrayElements,
      ReleaseShortArrayElements,
      ReleaseIntArrayElements,
      ReleaseLongArrayElements,
      ReleaseFloatArrayElements,
      ReleaseDoubleArrayElements,
      GetBooleanArrayRegion,
      GetByteArrayRegion,
      GetCharArrayRegion,
      GetShortArrayRegion,
      GetIntArrayRegion,
      GetLongArrayRegion,
      GetFloatArrayRegion,
      GetDoubleArrayRegion,
      SetBooleanArrayRegion,
      SetByteArrayRegion,
      SetCharArrayRegion,
      SetShortArrayRegion,
      SetIntArrayRegion,
      SetLongArrayRegion,
      SetFloatArrayRegion,
      SetDoubleArrayRegion,
      RegisterNatives,
      UnregisterNatives,
      MonitorEnter,
      MonitorExit,
      GetJavaVM,
      GetStringRegion,
      GetStringUTFRegion,
      GetPrimitiveArrayCritical,
      ReleasePrimitiveArrayCritical,
      GetStringCritical,
      ReleaseStringCritical,
      NewWeakGlobalRef,
      DeleteWeakGlobalRef,
      ExceptionCheck,
      NewDirectByteBuffer,
      GetDirectBufferAddress,
      GetDirectBufferCapacity,
      GetObjectRefType
      };
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值