Jni數(shù)據(jù)類型
Java類型 | jni類型 | 描述 |
---|---|---|
boolean | jboolean | C/C++8位整型 |
byte | jbyte | C/C++帶符號(hào)的8位整型 |
char | jchar | C/C++無(wú)符號(hào)的16位整型 |
short | jshort | C/C++帶符號(hào)的16位整型 |
int | jint | C/C++帶符號(hào)的32位整型 |
long | jlong | C/C++帶符號(hào)的64位整型e |
float | jfloat | C/C++32位浮點(diǎn)型 |
double | jdouble | C/C++64位浮點(diǎn)型 |
Object | jobject | 任何Java對(duì)象,或者沒(méi)有對(duì)應(yīng)java類型的對(duì)象 |
Class | jclass | Class對(duì)象 |
String | jstring | 字符串對(duì)象 |
Object[] | jobjectArray | 任何對(duì)象的數(shù)組 |
boolean[] | jbooleanArray | 布爾型數(shù)組 |
byte[] | jbyteArray | 比特型數(shù)組 |
char[] | jcharArray | 字符型數(shù)組 |
short[] | jshortArray | 短整型數(shù)組 |
int[] | jintArray | 整型數(shù)組 |
long[] | jlongArray | 長(zhǎng)整型數(shù)組 |
float[] | jfloatArray | 浮點(diǎn)型數(shù)組 |
double[] | jdoubleArray | 雙浮點(diǎn)型數(shù)組 |
Jni方法
來(lái)自 http://blog.chinaunix.net/uid-22028680-id-3429721.html
AndroidJNI.AllocObject 分配對(duì)象
static function AllocObject (clazz : IntPtr) : IntPtr
Description描述
Allocates a new Java object without invoking any of the constructors for the object.
分配新 Java 對(duì)象而不調(diào)用該對(duì)象的任何構(gòu)造函數(shù)娶桦。返回該對(duì)象的引用踢步。
clazz 參數(shù)務(wù)必不要引用數(shù)組類鄙币。AndroidJNI.AttachCurrentThread 附加當(dāng)前線程
static function AttachCurrentThread () : int
Description描述
Attaches the current thread to a Java (Dalvik) VM.
附加當(dāng)前線程到一個(gè)Java(Dalvik)虛擬機(jī)没佑。
A thread must be attached to the VM before any other JNI calls can be made.
一個(gè)線程必須附加到虛擬機(jī)弛车,在任何其他JNI可調(diào)用之前翎迁。
Returns 0 on success; returns a negative number on failure.
成功返回0符匾,失敗返回一個(gè)負(fù)數(shù)。AndroidJNI.CallBooleanMethod 調(diào)用布爾方法
static function CallBooleanMethod (obj : IntPtr, methodID : IntPtr, args : jvalue[]) : bool
Description描述
Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
調(diào)用一個(gè)由methodID定義的實(shí)例的Java方法害碾,可選擇傳遞參數(shù)(args)的數(shù)組到這個(gè)方法矢劲。AndroidJNI.CallByteMethod 調(diào)用字節(jié)方法
static function CallByteMethod (obj : IntPtr, methodID : IntPtr, args : jvalue[]) : Byte
Description描述
Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
調(diào)用一個(gè)由methodID定義的實(shí)例的Java方法,可選擇傳遞參數(shù)(args)的數(shù)組到這個(gè)方法慌随。AndroidJNI.CallCharMethod 調(diào)用字符方法
static function CallCharMethod (obj : IntPtr, methodID : IntPtr, args : jvalue[]) : Char
Description描述
Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
調(diào)用一個(gè)由methodID定義的實(shí)例的Java方法芬沉,可選擇傳遞參數(shù)(args)的數(shù)組到這個(gè)方法。AndroidJNI.CallDoubleMethod 調(diào)用雙精度浮點(diǎn)數(shù)方法
static function CallDoubleMethod (obj : IntPtr, methodID : IntPtr, args : jvalue[]) : double
Description描述
Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
調(diào)用一個(gè)由methodID定義的實(shí)例的Java方法阁猜,可選擇傳遞參數(shù)(args)的數(shù)組到這個(gè)方法丸逸。AndroidJNI.CallFloatMethod 調(diào)用浮點(diǎn)數(shù)方法
static function CallFloatMethod (obj : IntPtr, methodID : IntPtr, args : jvalue[]) : float
Description描述
Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
調(diào)用一個(gè)由methodID定義的實(shí)例的Java方法,可選擇傳遞參數(shù)(args)的數(shù)組到這個(gè)方法剃袍。AndroidJNI.CallIntMethod 調(diào)用整數(shù)方法
static function CallObjectMethod (obj : IntPtr, methodID : IntPtr, args : jvalue[]) : IntPtr
Description描述
Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
調(diào)用一個(gè)由methodID定義的實(shí)例的Java方法黄刚,可選擇傳遞參數(shù)(args)的數(shù)組到這個(gè)方法。AndroidJNI.CallLongMethod 調(diào)用長(zhǎng)整數(shù)方法
static function CallLongMethod (obj : IntPtr, methodID : IntPtr, args : jvalue[]) : Int64
Description描述
Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
調(diào)用一個(gè)由methodID定義的實(shí)例的Java方法民效,可選擇傳遞參數(shù)(args)的數(shù)組到這個(gè)方法憔维。AndroidJNI.CallObjectMethod 調(diào)用對(duì)象方法
static function CallObjectMethod (obj : IntPtr, methodID : IntPtr, args : jvalue[]) : IntPtr
Description描述
Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
調(diào)用一個(gè)由methodID定義的實(shí)例的Java方法,可選擇傳遞參數(shù)(args)的數(shù)組到這個(gè)方法畏邢。
This method returns a reference to a java.lang.Object, or a subclass thereof.
這個(gè)方法返回一個(gè)引用到j(luò)ava.lang.Object业扒,或者其子類。AndroidJNI.CallShortMethod 調(diào)用短整數(shù)方法
static function CallShortMethod (obj : IntPtr, methodID : IntPtr, args : jvalue[]) : Int16
Description描述
Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
調(diào)用一個(gè)由methodID定義的實(shí)例的Java方法舒萎,可選擇傳遞參數(shù)(args)的數(shù)組到這個(gè)方法程储。AndroidJNI.CallStaticBooleanMethod 調(diào)用靜態(tài)布爾方法
static function CallStaticBooleanMethod (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : bool
Description描述
Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
在一個(gè)Java對(duì)象調(diào)用一個(gè)靜態(tài)方法,根據(jù)指定的methodID逆甜,可選傳遞參數(shù)(args)的數(shù)組到該方法虱肄。AndroidJNI.CallStaticByteMethod 調(diào)用靜態(tài)字節(jié)方法
static function CallStaticByteMethod (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : Byte
Description描述
Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
在一個(gè)Java對(duì)象調(diào)用一個(gè)靜態(tài)方法,根據(jù)指定的methodID交煞,可選傳遞參數(shù)(args)的數(shù)組到該方法。AndroidJNI.CallStaticCharMethod 調(diào)用靜態(tài)字符方法
static function CallStaticCharMethod (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : Char
Description描述
Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
在一個(gè)Java對(duì)象調(diào)用一個(gè)靜態(tài)方法斟或,根據(jù)指定的methodID素征,可選傳遞參數(shù)(args)的數(shù)組到該方法。AndroidJNI.CallStaticDoubleMethod 調(diào)用靜態(tài)雙精度浮點(diǎn)數(shù)方法
static function CallStaticDoubleMethod (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : double
Description描述
Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
在一個(gè)Java對(duì)象調(diào)用一個(gè)靜態(tài)方法,根據(jù)指定的methodID御毅,可選傳遞參數(shù)(args)的數(shù)組到該方法根欧。AndroidJNI.CallStaticFloatMethod 調(diào)用靜態(tài)浮點(diǎn)數(shù)方法
static function CallStaticFloatMethod (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : float
Description描述
Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
在一個(gè)Java對(duì)象調(diào)用一個(gè)靜態(tài)方法,根據(jù)指定的methodID端蛆,可選傳遞參數(shù)(args)的數(shù)組到該方法凤粗。AndroidJNI.CallStaticIntMethod 調(diào)用靜態(tài)整數(shù)方法
static function CallStaticIntMethod (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : Int32
Description描述
Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
在一個(gè)Java對(duì)象調(diào)用一個(gè)靜態(tài)方法,根據(jù)指定的methodID今豆,可選傳遞參數(shù)(args)的數(shù)組到該方法嫌拣。AndroidJNI.CallStaticLongMethod 調(diào)用靜態(tài)長(zhǎng)整數(shù)方法
static function CallStaticLongMethod (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : Int64
Description描述
Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
在一個(gè)Java對(duì)象調(diào)用一個(gè)靜態(tài)方法,根據(jù)指定的methodID呆躲,可選傳遞參數(shù)(args)的數(shù)組到該方法异逐。AndroidJNI.CallStaticObjectMethod 調(diào)用靜態(tài)對(duì)象方法
static function CallStaticObjectMethod (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : IntPtr
Description描述
Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
在一個(gè)Java對(duì)象調(diào)用一個(gè)靜態(tài)方法,根據(jù)指定的methodID插掂,可選傳遞參數(shù)(args)的數(shù)組到該方法灰瞻。
This method returns a reference to a java.lang.Object, or a subclass thereof.
這個(gè)方法返回一個(gè)java.lang.Object的引用,或者其子類辅甥。AndroidJNI.CallStaticShortMethod 調(diào)用靜態(tài)短整數(shù)方法
static function CallStaticShortMethod (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : Int16
Description描述
Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
在一個(gè)Java對(duì)象調(diào)用一個(gè)靜態(tài)方法酝润,根據(jù)指定的methodID,可選傳遞參數(shù)(args)的數(shù)組到該方法璃弄。AndroidJNI.CallStaticStringMethod 調(diào)用靜態(tài)字符串方法
static function CallStaticStringMethod (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : string
Description描述
Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
在一個(gè)Java對(duì)象調(diào)用一個(gè)靜態(tài)方法要销,根據(jù)指定的methodID,可選傳遞參數(shù)(args)的數(shù)組到該方法谢揪。
This is a convenience function that calls CallStaticObjectMethod() with the same parameters, but creates a managed string from the result.
這是一個(gè)方便的函數(shù)蕉陋,調(diào)用帶有相同參數(shù)的CallStaticObjectMethod(),但從該結(jié)果創(chuàng)建一個(gè)托管字符串拨扶。AndroidJNI.CallStaticVoidMethod 調(diào)用靜態(tài)無(wú)類型方法
static function CallStaticVoidMethod (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : void
Description描述
Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
在一個(gè)Java對(duì)象調(diào)用一個(gè)靜態(tài)方法凳鬓,根據(jù)指定的methodID,可選傳遞參數(shù)(args)的數(shù)組到該方法患民。AndroidJNI.CallStringMethod 調(diào)用字符串方法
static function CallStringMethod (obj : IntPtr, methodID : IntPtr, args : jvalue[]) : string
Description描述
Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
調(diào)用一個(gè)由methodID定義的實(shí)例的Java方法缩举,可選擇傳遞參數(shù)(args)的數(shù)組到這個(gè)方法。
This is a convenience function that calls CallObjectMethod() with the same parameters, but creates a managed string from the result.
這是一個(gè)方便的函數(shù)匹颤,調(diào)用帶有相同參數(shù)的CallObjectMethod()仅孩,但從整個(gè)結(jié)果創(chuàng)建一個(gè)托管字符串。AndroidJNI.CallVoidMethod 調(diào)用無(wú)類型方法
static function CallVoidMethod (obj : IntPtr, methodID : IntPtr, args : jvalue[]) : void
Description描述
Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
調(diào)用一個(gè)由methodID定義的實(shí)例的Java方法印蓖,可選擇傳遞參數(shù)(args)的數(shù)組到這個(gè)方法辽慕。AndroidJNI.DeleteGlobalRef 刪除全局引用
static function DeleteGlobalRef (obj : IntPtr) : void
Description描述
Deletes the global reference pointed to by obj.
刪除 obj 所指向的全局引用。AndroidJNI.DeleteLocalRef 刪除局部引用
static function DeleteLocalRef (obj : IntPtr) : void
Description描述
Deletes the local reference pointed to by obj.
刪除 obj 所指向的局部引用赦肃。AndroidJNI.DetachCurrentThread 分離當(dāng)前線程
static function DetachCurrentThread () : int
Description描述
Detaches the current thread from a Java (Dalvik) VM.
從一個(gè)Java(Dalvik)虛擬機(jī)溅蛉,分類當(dāng)前線程公浪。
A thread must be detached from the VM before exiting.
從退出虛擬機(jī)之前,一個(gè)線程必須被分類船侧。AndroidJNI.EnsureLocalCapacity 確保局部性能
static function EnsureLocalCapacity (capacity : int) : int
Description描述
Ensures that at least a given number of local references can be created in the current thread.
在當(dāng)前線程確保至少一個(gè)可以被創(chuàng)建的給定局部引用數(shù)欠气。AndroidJNI.ExceptionClear 清除異常
static function ExceptionClear () : void
Description描述
Clears any exception that is currently being thrown.
清除當(dāng)前拋出的任何異常。如果當(dāng)前無(wú)異常镜撩,則此例程不產(chǎn)生任何效果预柒。AndroidJNI.ExceptionDescribe 描述異常
static function ExceptionDescribe () : void
Description描述
Prints an exception and a backtrace of the stack to the logcat
將異常及堆棧的回溯輸出到系統(tǒng)錯(cuò)誤報(bào)告信道。該例程可便利調(diào)試操作袁梗。AndroidJNI.ExceptionOccurred 發(fā)生異常
static function ExceptionOccurred () : IntPtr
Description描述
Determines if an exception is being thrown
確定是否某個(gè)異常正被拋出宜鸯。AndroidJNI.FatalError 致命錯(cuò)誤
static function FatalError (message : string) : void
Description描述
Raises a fatal error and does not expect the VM to recover. This function does not return.
拋出致命錯(cuò)誤并且不希望虛擬機(jī)進(jìn)行修復(fù)。該函數(shù)無(wú)返回值围段。AndroidJNI.FindClass 查找類
static function FindClass (name : string) : IntPtr
Description描述
This function loads a locally-defined class.
這個(gè)函數(shù)加載一個(gè)本地定義的類顾翼。AndroidJNI.FromBooleanArray 從布爾數(shù)組
static function FromBooleanArray (array : IntPtr) : Boolean[]
Description描述
Convert a Java array of boolean to a managed array of System.Boolean.
轉(zhuǎn)換一個(gè)Java布爾數(shù)組到一個(gè)托管System.Boolean數(shù)組。AndroidJNI.FromByteArray 從字節(jié)數(shù)組
static function FromByteArray (array : IntPtr) : Byte[]
Description描述
Convert a Java array of byte to a managed array of System.Byte.
轉(zhuǎn)換一個(gè)Java字節(jié)數(shù)組到一個(gè)托管的System.Byte數(shù)組奈泪。AndroidJNI.FromCharArray 從字符數(shù)組
static function FromCharArray (array : IntPtr) : Char[]
Description描述
Convert a Java array of char to a managed array of System.Char.
轉(zhuǎn)換一個(gè)Java字符數(shù)組到一個(gè)托管的System.Char數(shù)組适贸。AndroidJNI.FromDoubleArray 從雙精度浮點(diǎn)數(shù)數(shù)組
static function FromDoubleArray (array : IntPtr) : double[]
Description描述
Convert a Java array of double to a managed array of System.Double.
轉(zhuǎn)換一個(gè)Java雙精度浮點(diǎn)數(shù)數(shù)組到一個(gè)托管的System.Double數(shù)組。AndroidJNI.FromFloatArray 從浮點(diǎn)數(shù)數(shù)組
static function FromFloatArray (array : IntPtr) : float[]
Description描述
Convert a Java array of float to a managed array of System.Single.
轉(zhuǎn)換一個(gè)Java浮點(diǎn)數(shù)數(shù)組到一個(gè)托管的System.Single數(shù)組涝桅。AndroidJNI.FromIntArray 從整數(shù)數(shù)組
static function FromIntArray (array : IntPtr) : Int32[]
Description描述
Convert a Java array of int to a managed array of System.Int32.
轉(zhuǎn)換一個(gè)Java整數(shù)數(shù)組到一個(gè)托管的System.Int32數(shù)組拜姿。AndroidJNI.FromLongArray 從整長(zhǎng)數(shù)數(shù)組
static function FromLongArray (array : IntPtr) : Int64[]
Description描述
Convert a Java array of long to a managed array of System.Int64.
轉(zhuǎn)換一個(gè)Java長(zhǎng)整數(shù)數(shù)組到一個(gè)托管的System.Int64數(shù)組。AndroidJNI.FromObjectArray 從對(duì)象數(shù)組
static function FromObjectArray (array : IntPtr) : IntPtr[]
Description描述
Convert a Java array of java.lang.Object to a managed array of System.IntPtr, representing Java objects
轉(zhuǎn)換一個(gè)Java的java.lang.Object數(shù)組到一個(gè)托管的System.IntPtr數(shù)組冯遂,表示Java對(duì)象蕊肥。AndroidJNI.FromReflectedField 來(lái)自反射的域
static function FromReflectedField (refField : IntPtr) : IntPtr
Description描述
Converts a java.lang.reflect.Field to a field ID.
轉(zhuǎn)換一個(gè)java.lang.reflect.Field到一個(gè)域ID。AndroidJNI.FromReflectedMethod 來(lái)自反射的方法
static function FromReflectedMethod (refMethod : IntPtr) : IntPtr
Description描述
Converts a java.lang.reflect.Method or java.lang.reflect.Constructor object to a method ID.
轉(zhuǎn)換一個(gè)java.lang.reflect.Method或java.lang.reflect.Constructor對(duì)象到一個(gè)方法ID蛤肌。AndroidJNI.FromShortArray 從短整數(shù)數(shù)組
static function FromShortArray (array : IntPtr) : Int16[]
Description描述
Convert a Java array of short to a managed array of System.Int16.
轉(zhuǎn)換一個(gè)Java短整數(shù)數(shù)組到一個(gè)托管的System.Int16數(shù)組壁却。AndroidJNI.GetArrayLength 獲取數(shù)組長(zhǎng)度
static function GetArrayLength (array : IntPtr) : int
Description描述
Returns the number of elements in the array.
返回?cái)?shù)組的元素?cái)?shù)。AndroidJNI.GetBooleanArrayElement 獲取布爾數(shù)組元素
static function GetBooleanArrayElement (array : IntPtr, index : int) : bool
Description描述
Returns the value of one element of a primitive array.
返回一個(gè)基本數(shù)組一個(gè)元素的值裸准。
This function is a special case of GetBooleanArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的GetBooleanArrayRegion()展东,就是region大小設(shè)置為1時(shí)。AndroidJNI.GetBooleanField 獲取布爾域
static function GetBooleanField (obj : IntPtr, fieldID : IntPtr) : bool
Description描述
This function returns the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值炒俱。AndroidJNI.GetByteArrayElement 獲取字節(jié)數(shù)組元素
static function GetByteArrayElement (array : IntPtr, index : int) : Byte
Description描述
Returns the value of one element of a primitive array.
返回一個(gè)基本數(shù)組一個(gè)元素的值盐肃。
This function is a special case of GetByteArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的GetByteArrayRegion(),就是region大小設(shè)置為1時(shí)权悟。AndroidJNI.GetByteField 獲取字節(jié)域
static function GetByteField (obj : IntPtr, fieldID : IntPtr) : Byte
Description描述
This function returns the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值砸王。AndroidJNI.GetCharArrayElement 獲取字符數(shù)組元素
static function GetCharArrayElement (array : IntPtr, index : int) : Char
Description描述
Returns the value of one element of a primitive array.
返回一個(gè)基本數(shù)組一個(gè)元素的值。
This function is a special case of GetCharArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的GetCharArrayRegion()峦阁,就是region大小設(shè)置為1時(shí)谦铃。AndroidJNI.GetCharField 獲取字符域
static function GetCharField (obj : IntPtr, fieldID : IntPtr) : Char
Description描述
This function returns the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值。AndroidJNI.GetDoubleArrayElement 獲取雙精度浮點(diǎn)數(shù)數(shù)組元素
static function GetDoubleArrayElement (array : IntPtr, index : int) : double
Description描述
Returns the value of one element of a primitive array.
返回一個(gè)基本數(shù)組一個(gè)元素的值榔昔。
This function is a special case of GetDoubleArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的GetDoubleArrayRegion()荷辕,就是region大小設(shè)置為1時(shí)凿跳。AndroidJNI.GetDoubleField 獲取雙精度浮點(diǎn)數(shù)域
static function GetDoubleField (obj : IntPtr, fieldID : IntPtr) : double
Description描述
This function returns the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值件豌。AndroidJNI.GetFieldID 獲取域ID
static function GetFieldID (clazz : IntPtr, name : string, sig : string) : IntPtr
Description描述
Returns the field ID for an instance (nonstatic) field of a class.
返回類的實(shí)例(非靜態(tài))域的域 ID疮方。該域由其名稱及簽名指定。
GetFieldID() 將未初始化的類初始化茧彤。AndroidJNI.GetFloatArrayElement 獲取浮點(diǎn)數(shù)數(shù)組元素
static function GetFloatArrayElement (array : IntPtr, index : int) : float
Description描述
Returns the value of one element of a primitive array.
返回一個(gè)基本數(shù)組一個(gè)元素的值骡显。
This function is a special case of GetFloatArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的GetFloatArrayRegion(),就是region大小設(shè)置為1時(shí)曾掂。AndroidJNI.GetFloatField 獲取浮點(diǎn)數(shù)域
static function GetFloatField (obj : IntPtr, fieldID : IntPtr) : float
Description描述
This function returns the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值惫谤。AndroidJNI.GetIntArrayElement 獲取整數(shù)數(shù)組元素
static function GetIntArrayElement (array : IntPtr, index : int) : Int32
Description描述
Returns the value of one element of a primitive array.
返回一個(gè)基本數(shù)組一個(gè)元素的值。
This function is a special case of GetIntArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的GetIntArrayRegion()珠洗,就是region大小設(shè)置為1時(shí)溜歪。AndroidJNI.GetIntField 獲取整數(shù)域
static function GetIntField (obj : IntPtr, fieldID : IntPtr) : Int32
Description描述
This function returns the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值。AndroidJNI.GetLongArrayElement 獲取長(zhǎng)整數(shù)數(shù)組元素
static function GetLongArrayElement (array : IntPtr, index : int) : Int64
Description描述
Returns the value of one element of a primitive array.
返回一個(gè)基本數(shù)組一個(gè)元素的值许蓖。
This function is a special case of GetLongArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的GetLongArrayRegion()蝴猪,就是region大小設(shè)置為1時(shí)陪白。AndroidJNI.GetLongField 獲取長(zhǎng)整數(shù)域
static function GetLongField (obj : IntPtr, fieldID : IntPtr) : Int64
Description描述
This function returns the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值迫靖。AndroidJNI.GetMethodID 獲取方法ID
static function GetMethodID (clazz : IntPtr, name : string, sig : string) : IntPtr
Description描述
Returns the method ID for an instance (nonstatic) method of a class or interface.
返回類或接口實(shí)例(非靜態(tài))方法的方法 ID。方法可在某個(gè) clazz 的超類中定義腿椎,也可從 clazz 繼承米酬。該方法由其名稱和簽名決定沛豌。
GetMethodID() 可使未初始化的類初始化。AndroidJNI.GetObjectArrayElement 獲取對(duì)象數(shù)組元素
static function GetObjectArrayElement (array : IntPtr, index : int) : IntPtr
Description描述
Returns an element of an Object array.
返回一個(gè)對(duì)象數(shù)組的一個(gè)元素赃额。AndroidJNI.GetObjectClass 獲取對(duì)象類
static function GetObjectClass (obj : IntPtr) : IntPtr
Description描述
Returns the class of an object.
返回一個(gè)對(duì)象的類加派。AndroidJNI.GetObjectField 獲取對(duì)象域
static function GetObjectField (obj : IntPtr, fieldID : IntPtr) : IntPtr
Description描述
This function returns the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值。
The result is a reference to a java.lang.Object, or a subclass thereof.
其結(jié)果是對(duì)一個(gè)java.lang.Object的引用跳芳,或者其子類芍锦。AndroidJNI.GetShortArrayElement 獲取短整數(shù)數(shù)組元素
static function GetShortArrayElement (array : IntPtr, index : int) : Int16
Description描述
Returns the value of one element of a primitive array.
返回一個(gè)基本數(shù)組一個(gè)元素的值。
This function is a special case of GetShortArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的GetShortArrayRegion()筛严,就是region大小設(shè)置為1時(shí)醉旦。AndroidJNI.GetShortField 獲取短整數(shù)域
static function GetShortField (obj : IntPtr, fieldID : IntPtr) : Int16
Description描述
This function returns the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值。AndroidJNI.GetStaticBooleanField 獲取靜態(tài)布爾域
static function GetStaticBooleanField (clazz : IntPtr, fieldID : IntPtr) : bool
Description描述
This function returns the value of a static field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象靜態(tài)域的值桨啃。AndroidJNI.GetStaticByteField 獲取靜態(tài)字節(jié)域
static function GetStaticByteField (clazz : IntPtr, fieldID : IntPtr) : Byte
Description描述
This function returns the value of a static field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象靜態(tài)域的值车胡。AndroidJNI.GetStaticCharField 獲取靜態(tài)字符域
static function GetStaticCharField (clazz : IntPtr, fieldID : IntPtr) : Char
Description描述
This function returns the value of a static field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象靜態(tài)域的值。AndroidJNI.GetStaticDoubleField 獲取靜態(tài)雙精度浮點(diǎn)數(shù)域
static function GetStaticDoubleField (clazz : IntPtr, fieldID : IntPtr) : double
Description描述
This function returns the value of a static field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象靜態(tài)域的值照瘾。AndroidJNI.GetStaticFieldID 獲取靜態(tài)域ID
static function GetStaticFieldID (clazz : IntPtr, name : string, sig : string) : IntPtr
Description描述
Returns the field ID for a static field of a class.
返回類的靜態(tài)域的域 ID匈棘。域由其名稱和簽名指定。
GetStaticFieldID() 將未初始化的類初始化析命。AndroidJNI.GetStaticFloatField 獲取靜態(tài)浮點(diǎn)數(shù)域
static function GetStaticFloatField (clazz : IntPtr, fieldID : IntPtr) : float
Description描述
This function returns the value of a static field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象靜態(tài)域的值主卫。AndroidJNI.GetStaticIntField 獲取靜態(tài)整數(shù)域
static function GetStaticIntField (clazz : IntPtr, fieldID : IntPtr) : Int64
Description描述
This function returns the value of a static field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象靜態(tài)域的值逃默。AndroidJNI.GetStaticLongField 獲取靜態(tài)長(zhǎng)整數(shù)域
static function GetStaticLongField (clazz : IntPtr, fieldID : IntPtr) : Int64
Description描述
This function returns the value of a static field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象靜態(tài)域的值。AndroidJNI.GetStaticMethodID 獲取靜態(tài)方法ID
static function GetStaticMethodID (clazz : IntPtr, name : string, sig : string) : IntPtr
Description描述
Returns the method ID for a static method of a class.
返回類的靜態(tài)方法的方法 ID簇搅。方法由其名稱和簽名指定完域。
GetStaticMethodID() 將未初始化的類初始化。AndroidJNI.GetStaticObjectField 獲取靜態(tài)對(duì)象域
static function GetStaticObjectField (clazz : IntPtr, fieldID : IntPtr) : IntPtr
Description描述
This function returns the value of a static field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象靜態(tài)域的值瘩将。
The result is a reference to a java.lang.Object, or a subclass thereof.
該結(jié)果是一個(gè)java.lang.Object的引用吟税,或者其子類。AndroidJNI.GetStaticShortField 獲取靜態(tài)短整數(shù)域
static function GetStaticShortField (clazz : IntPtr, fieldID : IntPtr) : Int16
Description描述
This function returns the value of a static field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象靜態(tài)域的值姿现。AndroidJNI.GetStaticStringField 獲取靜態(tài)字符串域
static function GetStaticStringField (clazz : IntPtr, fieldID : IntPtr) : string
Description描述
This function returns the value of a static field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象靜態(tài)域的值肠仪。
This is a convenience function that calls GetStaticObjectField() with the same parameters, but creates a managed string from the result.
這是一個(gè)方便的函數(shù),調(diào)用帶有相同參數(shù)的GetStaticObjectField()备典,但從該結(jié)果創(chuàng)建一個(gè)托管字符串异旧。AndroidJNI.GetStringField 獲取字符串域
static function GetStringField (obj : IntPtr, fieldID : IntPtr) : string
Description描述
This function returns the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)返回一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值。
This is a convenience function that calls GetObjectField() with the same parameters, but creates a managed string from the result.
這是一個(gè)方便的函數(shù)提佣,調(diào)用帶有相同參數(shù)的GetObjectField()吮蛹,但從結(jié)果創(chuàng)建一個(gè)托管字符串。AndroidJNI.GetStringUTFChars 獲取字符串UTF的字符
static function GetStringUTFChars (str : IntPtr) : string
Description描述
Returns a managed string object representing the string in modified UTF-8 encoding.
返回由UTF-8修改的托管的字符串對(duì)象镐依。
另解匹涮,返回指向字符串的 UTF-8 字符數(shù)組的指針。
This method is a modification of the original GetStringUTFChars, which returns a pointer to an array of bytes.
這個(gè)方法是原始GetStringUTFChars的修改槐壳,返回指向字節(jié)的數(shù)組然低。AndroidJNI.GetStringUTFLength 獲取字符串UTF的長(zhǎng)度
static function GetStringUTFLength (str : IntPtr) : int
Description描述
Returns the length in bytes of the modified UTF-8 representation of a string.
以字節(jié)為單位返回字符串的 UTF-8 長(zhǎng)度。AndroidJNI.GetSuperclass 獲取超類
static function GetSuperclass (clazz : IntPtr) : IntPtr
Description描述
If clazz represents any class other than the class Object, then this function returns the object that represents the superclass of the class specified by clazz.
如果 clazz 代表類而非類 object务唐,則該函數(shù)返回由 clazz 所指定的類的超類雳攘。
If clazz specifies the class Object, or clazz represents an interface, this function returns NULL.
如果 clazz 指定類 Object,或代表某個(gè)接口枫笛,則該函數(shù)返回 NULL吨灭。AndroidJNI.GetVersion 獲取版本
static function GetVersion () : int
Description描述
Returns the version of the native method interface.
返回本地方法接口的版本。AndroidJNI.IsAssignableFrom 是否可賦值
static function IsAssignableFrom (clazz1 : IntPtr, clazz2 : IntPtr) : bool
Description描述
Determines whether an object of clazz1 can be safely cast to clazz2.
確定 clazz1 的對(duì)象是否可安全地強(qiáng)制轉(zhuǎn)換為 clazz2刑巧。AndroidJNI.IsInstanceOf 是否某類的實(shí)例
static function IsInstanceOf (obj : IntPtr, clazz : IntPtr) : bool
Description描述
Tests whether an object is an instance of a class.
測(cè)試對(duì)象是否為某個(gè)類的實(shí)例喧兄。AndroidJNI.IsSameObject 是否同一對(duì)象
static function IsSameObject (obj1 : IntPtr, obj2 : IntPtr) : bool
Description描述
Tests whether two references refer to the same Java object.
測(cè)試兩個(gè)引用是否引用同一 Java 對(duì)象。AndroidJNI.NewBooleanArray 新建布爾數(shù)組
static function NewBooleanArray (size : int) : IntPtr
Description描述
Construct a new primitive array object.
構(gòu)造一個(gè)新的基本數(shù)組對(duì)象啊楚。AndroidJNI.NewByteArray 新建字節(jié)數(shù)組
static function NewByteArray (size : int) : IntPtr
Description描述
Construct a new primitive array object.
構(gòu)造一個(gè)新的基本數(shù)組對(duì)象吠冤。AndroidJNI.NewCharArray 新建字符數(shù)組
static function NewCharArray (size : int) : IntPtr
Description描述
Construct a new primitive array object.
構(gòu)造一個(gè)新的基本數(shù)組對(duì)象。AndroidJNI.NewDoubleArray 新建雙精度浮點(diǎn)數(shù)數(shù)組
static function NewDoubleArray (size : int) : IntPtr
Description描述
Construct a new primitive array object.
構(gòu)造一個(gè)新的基本數(shù)組對(duì)象恭理。AndroidJNI.NewFloatArray 新建浮點(diǎn)數(shù)數(shù)組
static function NewFloatArray (size : int) : IntPtr
Description描述
Construct a new primitive array object.
構(gòu)造一個(gè)新的基本數(shù)組對(duì)象拯辙。AndroidJNI.NewGlobalRef 新建全局引用
static function NewGlobalRef (obj : IntPtr) : IntPtr
Description描述
Creates a new global reference to the object referred to by the obj argument.
創(chuàng)建 obj 參數(shù)所引用對(duì)象的新全局引用。全局引用通過(guò)調(diào)用 DeleteGlobalRef() 來(lái)顯式撤消颜价。
返回全局引用涯保。如果系統(tǒng)內(nèi)存不足則返回 NULL诉濒。AndroidJNI.NewIntArray 新建整數(shù)數(shù)組
static function NewIntArray (size : int) : IntPtr
Description描述
Construct a new primitive array object.
構(gòu)造一個(gè)新的基本數(shù)組對(duì)象。AndroidJNI.NewLocalRef 新建局部引用
static function NewLocalRef (obj : IntPtr) : IntPtr
Description描述
Creates a new local reference that refers to the same object as obj.
創(chuàng)建 obj 參數(shù)對(duì)象的新局部引用夕春。AndroidJNI.NewLongArray 新建長(zhǎng)整數(shù)數(shù)組
static function NewLongArray (size : int) : IntPtr
Description描述
Construct a new primitive array object.
構(gòu)造一個(gè)新的基本數(shù)組對(duì)象未荒。AndroidJNI.NewObjectArray 新建對(duì)象數(shù)組
static function NewObjectArray (size : int, clazz : IntPtr, obj : IntPtr) : IntPtr
Description描述
Constructs a new array holding objects in class clazz. All elements are initially set to obj.
構(gòu)造新的數(shù)組,它將保存在類 clazz 中的對(duì)象撇他。所有元素初始值均設(shè)為 obj茄猫。AndroidJNI.NewObject 新建對(duì)象
static function NewObject (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : IntPtr
Description描述
Constructs a new Java object. The method ID indicates which constructor method to invoke. This ID must be obtained by calling GetMethodID() with as the method name and void (V) as the return type.
構(gòu)造新的 Java 對(duì)象。方法 ID指示應(yīng)調(diào)用的構(gòu)造函數(shù)方法困肩。該 ID 必須通過(guò)調(diào)用 GetMethodID() 獲得,且調(diào)用時(shí)的方法名必須為 <init>脆侮,而返回類型必須為 void (V)锌畸。
clazz 參數(shù)務(wù)必不要引用數(shù)組類。AndroidJNI.NewShortArray 新建短整數(shù)數(shù)組
static function NewShortArray (size : int) : IntPtr
Description描述
Construct a new primitive array object.
構(gòu)造一個(gè)新的基本數(shù)組對(duì)象靖避。AndroidJNI.NewStringUTF 新建UTF字符串
static function NewStringUTF (bytes : string) : IntPtr
Description描述
Constructs a new java.lang.String object from an array of characters in modified UTF-8 encoding.
利用 UTF-8 字符數(shù)組構(gòu)造新的 java.lang.String 對(duì)象潭枣。AndroidJNI.PopLocalFrame 彈出局部幀
static function PopLocalFrame (result : IntPtr) : IntPtr
Description描述
Pops off the current local reference frame, frees all the local references, and returns a local reference in the previous local reference frame for the given result object.
彈出關(guān)閉當(dāng)前局部引用幀,釋放所有的本地引用幻捏,并返回一個(gè)局部引用盆犁,在前一個(gè)局部引用幀,用于給定的結(jié)果對(duì)象篡九。
PushLocalFrame為一定數(shù)量的局部引用創(chuàng)建了一個(gè)使用堆棧谐岁,而PopLocalFrame負(fù)責(zé)銷毀堆棧頂端的引用。
Push/PopLocalFrame函數(shù)對(duì)提供了對(duì)局部引用的生命周期更方便的管理榛臼。
在管理局部引用的生命周期中伊佃,Push/PopLocalFrame是非常方便的。你可以在本地函數(shù)的入口處調(diào)用PushLocalFrame沛善,然后在出 口處調(diào)用PopLocalFrame航揉,這樣的話,在函數(shù)對(duì)中間任何位置創(chuàng)建的局部引用都會(huì)被釋放金刁。而且帅涂,這兩個(gè)函數(shù)是非常高效的。
如果你在函數(shù)的入口處調(diào)用了PushLocalFrame尤蛮,記住在所有的出口(有return出現(xiàn)的地方)調(diào)用PopLocalFrame媳友。
大量的局部引用創(chuàng)建會(huì)浪費(fèi)不必要的內(nèi)存。一個(gè)局部引用會(huì)導(dǎo)致它本身和它所指向的對(duì)象都得不到回收抵屿。尤其要注意那些長(zhǎng)時(shí)間運(yùn)行的方法. 創(chuàng)建局部引用的循環(huán)和工具函數(shù)庆锦,充分得利用Pus/PopLocalFrame來(lái)高效地管理局部引用。AndroidJNI.PushLocalFrame 壓入局部幀
static function PushLocalFrame (capacity : int) : int
Description描述
Creates a new local reference frame, in which at least a given number of local references can be created.
創(chuàng)建一個(gè)新的局部引入幀轧葛,至少一個(gè)給定的局部引用可以被創(chuàng)建的數(shù)搂抒。
PushLocalFrame為一定數(shù)量的局部引用創(chuàng)建了一個(gè)使用堆棧艇搀,而PopLocalFrame負(fù)責(zé)銷毀堆棧頂端的引用。
Push/PopLocalFrame函數(shù)對(duì)提供了對(duì)局部引用的生命周期更方便的管理求晶。
在管理局部引用的生命周期中焰雕,Push/PopLocalFrame是非常方便的。你可以在本地函數(shù)的入口處調(diào)用PushLocalFrame芳杏,然后在出 口處調(diào)用PopLocalFrame矩屁,這樣的話,在函數(shù)對(duì)中間任何位置創(chuàng)建的局部引用都會(huì)被釋放爵赵。而且吝秕,這兩個(gè)函數(shù)是非常高效的。
如果你在函數(shù)的入口處調(diào)用了PushLocalFrame空幻,記住在所有的出口(有return出現(xiàn)的地方)調(diào)用PopLocalFrame烁峭。
大量的局部引用創(chuàng)建會(huì)浪費(fèi)不必要的內(nèi)存。一個(gè)局部引用會(huì)導(dǎo)致它本身和它所指向的對(duì)象都得不到回收秕铛。尤其要注意那些長(zhǎng)時(shí)間運(yùn)行的方法. 創(chuàng)建局部引用的循環(huán)和工具函數(shù)约郁,充分得利用Pus/PopLocalFrame來(lái)高效地管理局部引用。AndroidJNI.SetBooleanArrayElement 設(shè)置布爾數(shù)組數(shù)組元素
static function SetBooleanArrayElement (array : IntPtr, index : int, val : byte) : void
Description描述
Sets the value of one element in a primitive array.
設(shè)置一個(gè)基本數(shù)組一個(gè)元素的值但两。
This function is a special case of SetBooleanArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的SetBooleanArrayRegion()鬓梅,就是region大小設(shè)置為1時(shí)。AndroidJNI.SetBooleanField 設(shè)置布爾域
static function SetBooleanField (obj : IntPtr, fieldID : IntPtr, val : bool) : void
Description描述
This function sets the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值谨湘。AndroidJNI.SetByteArrayElement 設(shè)置字節(jié)數(shù)組元素
static function SetByteArrayElement (array : IntPtr, index : int, val : sbyte) : void
Description描述
Sets the value of one element in a primitive array.
設(shè)置一個(gè)基本數(shù)組一個(gè)元素的值绽快。
This function is a special case of SetByteArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的SetByteArrayRegion(),就是region大小設(shè)置為1時(shí)悲关。AndroidJNI.SetByteField 設(shè)置字節(jié)域
static function SetByteField (obj : IntPtr, fieldID : IntPtr, val : Byte) : void
Description描述
This function sets the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值谎僻。AndroidJNI.SetCharArrayElement 設(shè)置字符數(shù)組元素
static function SetCharArrayElement (array : IntPtr, index : int, val : Char) : void
Description描述
Sets the value of one element in a primitive array.
設(shè)置一個(gè)基本數(shù)組一個(gè)元素的值。
This function is a special case of SetCharArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的SetCharArrayRegion()寓辱,就是region大小設(shè)置為1時(shí)艘绍。AndroidJNI.SetCharField 設(shè)置字符域
static function SetCharField (obj : IntPtr, fieldID : IntPtr, val : Char) : void
Description描述
This function sets the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值。AndroidJNI.SetDoubleArrayElement 設(shè)置雙精度浮點(diǎn)數(shù)數(shù)組元素
static function SetDoubleArrayElement (array : IntPtr, index : int, val : double) : void
Description描述
Sets the value of one element in a primitive array.
設(shè)置一個(gè)基本數(shù)組一個(gè)元素的值秫筏。
This function is a special case of SetDoubleArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的SetDoubleArrayRegion()诱鞠,就是region大小設(shè)置為1時(shí)。AndroidJNI.SetDoubleField 設(shè)置雙精度浮點(diǎn)數(shù)域
static function SetDoubleField (obj : IntPtr, fieldID : IntPtr, val : double) : void
Description描述
This function sets the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值这敬。AndroidJNI.SetFloatArrayElement 設(shè)置浮點(diǎn)數(shù)數(shù)組元素
static function SetFloatArrayElement (array : IntPtr, index : int, val : float) : void
Description描述
Sets the value of one element in a primitive array.
設(shè)置一個(gè)基本數(shù)組一個(gè)元素的值航夺。
This function is a special case of SetFloatArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的SetFloatArrayRegion(),就是region大小設(shè)置為1時(shí)崔涂。AndroidJNI.SetFloatField 設(shè)置浮點(diǎn)數(shù)域
static function SetFloatField (obj : IntPtr, fieldID : IntPtr, val : float) : void
Description描述
This function sets the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值阳掐。AndroidJNI.SetIntArrayElement 設(shè)置整數(shù)數(shù)組元素
static function SetIntArrayElement (array : IntPtr, index : int, val : Int32) : void
Description描述
Sets the value of one element in a primitive array.
設(shè)置一個(gè)基本數(shù)組一個(gè)元素的值。
This function is a special case of SetIntArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的SetIntArrayRegion(),就是region大小設(shè)置為1時(shí)缭保。AndroidJNI.SetIntField 設(shè)置整數(shù)域
static function SetIntField (obj : IntPtr, fieldID : IntPtr, val : Int32) : void
Description描述
This function sets the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值汛闸。AndroidJNI.SetLongArrayElement 設(shè)置長(zhǎng)整數(shù)數(shù)組元素
static function SetLongArrayElement (array : IntPtr, index : int, val : Int64) : void
Description描述
Sets the value of one element in a primitive array.
設(shè)置一個(gè)基本數(shù)組一個(gè)元素的值。
This function is a special case of SetLongArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的SetLongArrayRegion()艺骂,就是region大小設(shè)置為1時(shí)诸老。AndroidJNI.SetLongField 設(shè)置長(zhǎng)整數(shù)域
static function SetLongField (obj : IntPtr, fieldID : IntPtr, val : Int64) : void
Description描述
This function sets the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值。AndroidJNI.SetObjectArrayElement 設(shè)置對(duì)象數(shù)組元素
static function SetObjectArrayElement (array : IntPtr, index : int, obj : IntPtr) : void
Description描述
Sets an element of an Object array.
設(shè)置一個(gè)對(duì)象數(shù)組的一個(gè)元素钳恕。AndroidJNI.SetObjectField 設(shè)置對(duì)象域
static function SetObjectField (obj : IntPtr, fieldID : IntPtr, val : IntPtr) : void
Description描述
This function sets the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值别伏。
The value to set is a reference to either a java.lang.Object, or a subclass thereof.
要設(shè)置的值無(wú)論是一個(gè)java.lang.Object的引用,或者其子類忧额。AndroidJNI.SetShortArrayElement 設(shè)置短整數(shù)數(shù)組元素
static function SetShortArrayElement (array : IntPtr, index : int, val : Int16) : void
Description描述
Sets the value of one element in a primitive array.
設(shè)置一個(gè)基本數(shù)組一個(gè)元素的值厘肮。
This function is a special case of SetShortArrayRegion(), called with region size set to 1.
這個(gè)函數(shù)是一個(gè)特殊情況的SetShortArrayRegion(),就是region大小設(shè)置為1時(shí)宙址。AndroidJNI.SetShortField 設(shè)置短整數(shù)域
static function SetShortField (obj : IntPtr, fieldID : IntPtr, val : Int16) : void
Description描述
This function sets the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值轴脐。AndroidJNI.SetStaticBooleanField 設(shè)置靜態(tài)布爾域
static function SetStaticBooleanField (clazz : IntPtr, fieldID : IntPtr, val : bool) : void
Description描述
This function ets the value of a static field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象的靜態(tài)域的值。AndroidJNI.SetStaticByteField 設(shè)置靜態(tài)字節(jié)域
static function SetStaticByteField (clazz : IntPtr, fieldID : IntPtr, val : Byte) : void
Description描述
This function ets the value of a static field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象的靜態(tài)域的值抡砂。AndroidJNI.SetStaticCharField 設(shè)置靜態(tài)字符域
static function SetStaticCharField (clazz : IntPtr, fieldID : IntPtr, val : Char) : void
Description描述
This function ets the value of a static field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象的靜態(tài)域的值。AndroidJNI.SetStaticDoubleField 設(shè)置靜態(tài)雙精度浮點(diǎn)數(shù)域
static function SetStaticDoubleField (clazz : IntPtr, fieldID : IntPtr, val : double) : void
Description描述
This function ets the value of a static field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象的靜態(tài)域的值恬涧。AndroidJNI.SetStaticFloatField 設(shè)置靜態(tài)浮點(diǎn)數(shù)域
static function SetStaticFloatField (clazz : IntPtr, fieldID : IntPtr, val : float) : void
Description描述
This function ets the value of a static field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象的靜態(tài)域的值注益。AndroidJNI.SetStaticIntField 設(shè)置靜態(tài)整數(shù)域
static function SetStaticIntField (clazz : IntPtr, fieldID : IntPtr, val : Int32) : void
Description描述
This function ets the value of a static field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象的靜態(tài)域的值。AndroidJNI.SetStaticLongField 設(shè)置靜態(tài)長(zhǎng)整數(shù)域
static function SetStaticLongField (clazz : IntPtr, fieldID : IntPtr, val : Int64) : void
Description描述
This function ets the value of a static field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象的靜態(tài)域的值溯捆。AndroidJNI.SetStaticObjectField 設(shè)置靜態(tài)對(duì)象域
static function SetStaticObjectField (clazz : IntPtr, fieldID : IntPtr, val : IntPtr) : void
Description描述
This function ets the value of a static field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象的靜態(tài)域的值丑搔。
The value to set is a reference to either a java.lang.Object, or a subclass thereof.
設(shè)置該值不管是一個(gè)java.lang.Object的引用,或是其子類提揍。AndroidJNI.SetStaticShortField 設(shè)置靜態(tài)短整數(shù)域
static function SetStaticShortField (clazz : IntPtr, fieldID : IntPtr, val : Int16) : void
Description描述
This function ets the value of a static field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象的靜態(tài)域的值啤月。AndroidJNI.SetStaticStringField 設(shè)置靜態(tài)字符串域
static function SetStaticStringField (clazz : IntPtr, fieldID : IntPtr, val : string) : void
Description描述
This function ets the value of a static field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象的靜態(tài)域的值。
This is a convenience function that calls SetStaticObjectField() with the same parameters, but performs the necessary marshalling of the string value.
這是一個(gè)方便的函數(shù)劳跃,調(diào)用帶有相同參數(shù)的SetStaticObjectField()谎仲,但執(zhí)行需要字符串的值編組。AndroidJNI.SetStringField 設(shè)置字符串域
static function SetStringField (obj : IntPtr, fieldID : IntPtr, val : string) : void
Description描述
This function sets the value of an instance (nonstatic) field of an object.
這個(gè)函數(shù)設(shè)置一個(gè)對(duì)象實(shí)例(非靜態(tài))域的值刨仑。
This is a convenience function that calls SetObjectField() with the same parameters, but performs the necessary marshalling of the string value.
這是一個(gè)方便的函數(shù)郑诺,調(diào)用帶有相同參數(shù)的SetObjectField(),但執(zhí)行字符串的值需要編組杉武。AndroidJNI.ThrowNew 新的拋出
static function ThrowNew (clazz : IntPtr, message : string) : int
Description描述
Constructs an exception object from the specified class with the message specified by message and causes that exception to be thrown.
利用指定類的消息(由 message 指定)構(gòu)造異常對(duì)象并拋出該異常辙诞。AndroidJNI.Throw 拋出
static function Throw (obj : IntPtr) : int
Description描述
Causes a java.lang.Throwable object to be thrown.
導(dǎo)致一個(gè)java.lang.Throwable的對(duì)象被拋出。AndroidJNI.ToBooleanArray 到布爾數(shù)組
static function ToBooleanArray (array : Boolean[]) : IntPtr
Description描述
Convert a managed array of System.Boolean to a Java array of boolean.
轉(zhuǎn)換一個(gè)System.Boolean的托管數(shù)組到一個(gè)Java布爾數(shù)組轻抱。AndroidJNI.ToByteArray 到字節(jié)數(shù)組
static function ToByteArray (array : Byte[]) : IntPtr
Description描述
Convert a managed array of System.Byte to a Java array of byte.
轉(zhuǎn)換一個(gè)System.Byte的托管數(shù)組到一個(gè)Java的字節(jié)數(shù)組飞涂。AndroidJNI.ToCharArray 到字符數(shù)組
static function ToCharArray (array : Char[]) : IntPtr
Description描述
Convert a managed array of System.Char to a Java array of char.
轉(zhuǎn)換一個(gè)System.Char的托管數(shù)組到一個(gè)Java的字符數(shù)組。AndroidJNI.ToDoubleArray 到雙精度浮點(diǎn)數(shù)數(shù)組
static function ToDoubleArray (array : double[]) : IntPtr
Description描述
Convert a managed array of System.Double to a Java array of double.
轉(zhuǎn)換一個(gè)System.Double的托管數(shù)組到一個(gè)Java的雙精度浮點(diǎn)數(shù)數(shù)組。AndroidJNI.ToFloatArray 到浮點(diǎn)數(shù)數(shù)組
static function ToFloatArray (array : float[]) : IntPtr
Description描述
Convert a managed array of System.Single to a Java array of float.
轉(zhuǎn)換一個(gè)System.Single的托管數(shù)組到一個(gè)Java的浮點(diǎn)數(shù)數(shù)組较店。AndroidJNI.ToIntArray 到整數(shù)數(shù)組
static function ToIntArray (array : Int32[]) : IntPtr
Description描述
Convert a managed array of System.Int32 to a Java array of int.
轉(zhuǎn)換一個(gè)System.Int32的托管數(shù)組到一個(gè)Java的整數(shù)數(shù)組士八。AndroidJNI.ToLongArray 到長(zhǎng)整數(shù)數(shù)組
static function ToLongArray (array : Int64[]) : IntPtr
Description描述
Convert a managed array of System.Int64 to a Java array of long.
轉(zhuǎn)換一個(gè)System.Int64的托管數(shù)組到一個(gè)Java的長(zhǎng)整數(shù)數(shù)組。AndroidJNI.ToObjectArray 到對(duì)象數(shù)組
static function ToObjectArray (array : IntPtr[]) : IntPtr
Description描述
Convert a managed array of System.IntPtr, representing Java objects, to a Java array of java.lang.Object.
轉(zhuǎn)換一個(gè)System.IntPtr的托管數(shù)組泽西,表示Java對(duì)象曹铃,到一個(gè)Java的java.lang.Object數(shù)組。AndroidJNI.ToReflectedField 到反射的域
static function ToReflectedField (clazz : IntPtr, fieldID : IntPtr, isStatic : bool) : IntPtr
Description描述
Converts a field ID derived from cls to a java.lang.reflect.Field object.
轉(zhuǎn)換一個(gè)取自clazz的域ID到一個(gè)java.lang.reflect.Field對(duì)象捧杉。AndroidJNI.ToReflectedMethod 到反射的方法
static function ToReflectedMethod (clazz : IntPtr, methodID : IntPtr, isStatic : bool) : IntPtr
Description描述
Converts a method ID derived from clazz to a java.lang.reflect.Method or java.lang.reflect.Constructor object.
轉(zhuǎn)換一個(gè)取自clazz的方法ID到一個(gè)java.lang.reflect.Method 或 java.lang.reflect.Constructor對(duì)象陕见。AndroidJNI.ToShortArray 到短整數(shù)數(shù)組
static function ToShortArray (array : Int16[]) : IntPtr
Description描述
Convert a managed array of System.Int16 to a Java array of short.
轉(zhuǎn)換一個(gè)System.Int16的托管數(shù)組到一個(gè)Java的短整數(shù)數(shù)組。