2. JNI 类型和数据结构
来源:互联网 发布:iphone透明屏幕软件 编辑:程序博客网 时间:2024/05/16 02:28
来自:JNI Types And Data Structures
1. Primitive Types
Primitive Types and Native Equivalents:
2. Reference Types
JNI reference hierarchy:
- jobject
- jclass (java.lang.Class objects)
- jstring (java.lang.String objects)
- jthrowable (java.lang.Throwable objects)
- jarray (arrays)
jobjectArray (object arrays)
jbooleanArray (boolean arrays)
jbyteArray (byte arrays)
jcharArray (char arrays)
jshortArray (short arrays)
jintArray (int arrays)
jlongArray (long arrays)
jfloatArray (float arrays)
jdoubleArray (double arrays)
3. Field and Method IDs
Method and field IDs are regular C pointer types:
struct _jfieldID; /* opaque structure */typedef struct _jfieldID *jfieldID; /* field IDs */struct _jmethodID; /* opaque structure */typedef struct _jmethodID *jmethodID; /* method IDs */
4. The Value Type
The jvalue union type is used as the element type in argument arrays. Declared as follows:
typedef union jvalue { jboolean z; jbyte b; jchar c; jshort s; jint i; jlong j; jfloat f; jdouble d; jobject l;} jvalue;
5. Type Signatures
The JNI uses the Java VM’s representation of type signatures.
Java VM Type Signatures
Eg:
Java method
long f (int n, String s, int[] arr);
The following type signatures:
//整体结构:(参数)返回值//参数:I - int n;Ljava/lang/String - String s;[I - int[] arr//返回值:J - long(ILjava/lang/String;[I)J
6. Modified UTF-8 Strings
参考地址:Modified UTF-8 Strings
阅读全文
0 0
- 2. JNI 类型和数据结构
- JNI类型和数据结构
- 《Java 本地接口规范》-JNI 的类型和数据结构
- Android Studio3.0开发JNI流程------JNI的类型和数据结构
- 数据结构和类型2
- Part3.JNI类型映射和参数传递
- Jni的数据类型和类型签名
- JNI的数据类型和类型签名
- android jni类型和参数签名
- jni中的基本类型、字符串和数组
- JNI类型签名和方法签名
- jni类型
- JNI 类型
- Jni中本地类型和java类型对应表
- Java类型和本地类型对应情况(JNI基础)
- JNI中的类型和c语言中的类型转换
- Java中JNI:JNIEnv类型和jobject类型的解释
- JNI和NDK编程(三)JNI的数据类型和类型签名
- POJ 3252.Round Numbers
- 目标管理
- 交会定点(前方交会、测边交会、后方交会)程序C++代码
- VUE脚手架构建
- Maven:mirror(镜像)和repository(仓库) 区别
- 2. JNI 类型和数据结构
- 指针与地址
- 用c语言实现字符串倒序的几种情况
- 各种xlsx转换程Csv
- 静音去除的问题
- 机器学习算法练习之(一):Python实现logistic回归
- 使用Git Submodule管理子模块
- 怎么aop中实现记录请求访问时间:用ThreadLocal
- 3. JNI Functions