Android JNI所有方法

来源:互联网 发布:淘宝的成功原因有哪些 编辑:程序博客网 时间:2024/05/21 22:53

http://game.ceeger.com/Script/AndroidJNI/AndroidJNI.html

'Raw' JNI interface to Android Dalvik (Java) VM from Mono (CS/JS)

从Mono (CS/JS),原始JNI接口到安卓Dalvik (Java)虚拟机。

JNI是Java Native Interface的缩写,中文为JAVA本地调用。从Java1.1开始,Java Native Interface(JNI)标准成为java平台的一部分,它允许Java代码和其他语言写的代码进行交互。JNI一开始是为了本地已编译语言,尤其是C和C++而设计的,但是它并不妨碍你使用其他语言,只要调用约定受支持就可以了。

Class Functions类函数

  • AttachCurrentThread
    Attaches the current thread to a Java (Dalvik) VM.
    附加当前线程到一个Java(Dalvik)虚拟机。
  • DetachCurrentThread
    Detaches the current thread from a Java (Dalvik) VM.
    从一个Java(Dalvik)虚拟机,分类当前线程。
  • GetVersion
    Returns the version of the native method interface.
    返回本地方法接口的版本。
  • FindClass
    This function loads a locally-defined class.
    这个函数加载一个本地定义的类。
  • FromReflectedMethod
    Converts a java.lang.reflect.Method or java.lang.reflect.Constructor object to a method ID.
    转换一个java.lang.reflect.Method或java.lang.reflect.Constructor对象到一个方法ID。
  • FromReflectedField
    Converts a java.lang.reflect.Field to a field ID.
    转换一个java.lang.reflect.Field到一个域ID。
  • ToReflectedMethod
    Converts a method ID derived from clazz to a java.lang.reflect.Method or java.lang.reflect.Constructor object.
    转换一个取自clazz的方法ID到一个java.lang.reflect.Method 或 java.lang.reflect.Constructor对象。
  • ToReflectedField
    Converts a field ID derived from cls to a java.lang.reflect.Field object.
    转换一个取自clazz的域ID到一个java.lang.reflect.Field对象。
  • GetSuperclass
    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,则该函数返回由 clazz 所指定的类的超类。 
  • IsAssignableFrom
    Determines whether an object of clazz1 can be safely cast to clazz2.
    确定 clazz1 的对象是否可安全地强制转换为 clazz2。 
  • Throw
    Causes a java.lang.Throwable object to be thrown.
    利用指定类的消息(由 message 指定)构造异常对象并抛出该异常。
  • ThrowNew
    Constructs an exception object from the specified class with the message specified by message and causes that exception to be thrown.
    利用指定类的消息(由 message 指定)构造异常对象并抛出该异常。
  • ExceptionOccurred
    Determines if an exception is being thrown
    确定是否某个异常正被抛出。
  • ExceptionDescribe
    Prints an exception and a backtrace of the stack to the logcat
    将异常及堆栈的回溯输出到系统错误报告信道。该例程可便利调试操作。 
  • ExceptionClear
    Clears any exception that is currently being thrown.
    清除当前抛出的任何异常。如果当前无异常,则此例程不产生任何效果。
  • FatalError
    Raises a fatal error and does not expect the VM to recover. This function does not return.
    抛出致命错误并且不希望虚拟机进行修复。该函数无返回值。 
  • PushLocalFrame
    Creates a new local reference frame, in which at least a given number of local references can be created.
    创建一个新的局部引入帧,至少一个给定的局部引用可以被创建的数。
  • PopLocalFrame
    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.
    弹出关闭当前局部引用帧,释放所有的本地引用,并返回一个局部引用,在前一个局部引用帧,用于给定的结果对象。
  • NewGlobalRef
    Creates a new global reference to the object referred to by the obj argument.
    创建 obj 参数所引用对象的新全局引用。
  • DeleteGlobalRef
    Deletes the global reference pointed to by obj.
    删除 obj 所指向的全局引用。 
  • NewLocalRef
    Creates a new local reference that refers to the same object as obj.
    创建 obj 参数对象的新局部引用。
  • DeleteLocalRef
    Deletes the local reference pointed to by obj.
    删除 obj 所指向的局部引用。 
  • IsSameObject
    Tests whether two references refer to the same Java object.
    测试两个引用是否引用同一 Java 对象。 
  • EnsureLocalCapacity
    Ensures that at least a given number of local references can be created in the current thread.
    在当前线程确保至少一个可以被创建的给定局部引用数。
  • AllocObject
    Allocates a new Java object without invoking any of the constructors for the object.
    分配新 Java 对象而不调用该对象的任何构造函数。返回该对象的引用。 
  • NewObject
    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.
    构造新的 Java 对象。方法 ID指示应调用的构造函数方法。该 ID 必须通过调用 GetMethodID() 获得,且调用时的方法名必须为 <init>,而返回类型必须为 void (V)。
  • GetObjectClass
    Returns the class of an object.
    返回一个对象的类。
  • IsInstanceOf
    Tests whether an object is an instance of a class.
    测试对象是否为某个类的实例。
  • GetMethodID
    Returns the method ID for an instance (nonstatic) method of a class or interface.
    返回类或接口实例(非静态)方法的方法 ID。
  • GetFieldID
    Returns the field ID for an instance (nonstatic) field of a class.
    返回类的实例(非静态)域的域 ID。该域由其名称及签名指定。
  • GetStaticMethodID
    Returns the method ID for a static method of a class.
    返回类的静态方法的方法 ID。方法由其名称和签名指定。
  • GetStaticFieldID
    Returns the field ID for a static field of a class.
    返回类的静态域的域 ID。域由其名称和签名指定。
  • NewStringUTF
    Constructs a new java.lang.String object from an array of characters in modified UTF-8 encoding.
    利用 UTF-8 字符数组构造新的 java.lang.String 对象。
  • GetStringUTFLength
    Returns the length in bytes of the modified UTF-8 representation of a string.
    以字节为单位返回字符串的 UTF-8 长度。
  • GetStringUTFChars
    Returns a managed string object representing the string in modified UTF-8 encoding.
    返回由UTF-8修改的托管的字符串对象。
  • CallStringMethod
    Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
    调用一个由methodID定义的实例的Java方法,可选择传递参数(args)的数组到这个方法。
  • CallObjectMethod
    Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
    调用一个由methodID定义的实例的Java方法,可选择传递参数(args)的数组到这个方法。
  • CallIntMethod
    Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
    调用一个由methodID定义的实例的Java方法,可选择传递参数(args)的数组到这个方法。
  • CallBooleanMethod
    Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
    调用一个由methodID定义的实例的Java方法,可选择传递参数(args)的数组到这个方法。
  • CallShortMethod
    Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
    调用一个由methodID定义的实例的Java方法,可选择传递参数(args)的数组到这个方法。
  • CallByteMethod
    Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
    调用一个由methodID定义的实例的Java方法,可选择传递参数(args)的数组到这个方法。
  • CallCharMethod
    Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
    调用一个由methodID定义的实例的Java方法,可选择传递参数(args)的数组到这个方法。
  • CallFloatMethod
    Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
    调用一个由methodID定义的实例的Java方法,可选择传递参数(args)的数组到这个方法。
  • CallDoubleMethod
    Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
    调用一个由methodID定义的实例的Java方法,可选择传递参数(args)的数组到这个方法。
  • CallLongMethod
    Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
    调用一个由methodID定义的实例的Java方法,可选择传递参数(args)的数组到这个方法。
  • CallVoidMethod
    Calls an instance (nonstatic) Java method defined by methodID, optionally passing an array of arguments (args) to the method.
    调用一个由methodID定义的实例的Java方法,可选择传递参数(args)的数组到这个方法。
  • GetStringField
    This function returns the value of an instance (nonstatic) field of an object.
    这个函数返回一个对象实例(非静态)域的值。
  • GetObjectField
    This function returns the value of an instance (nonstatic) field of an object.
    这个函数返回一个对象实例(非静态)域的值。
  • GetBooleanField
    This function returns the value of an instance (nonstatic) field of an object.
    这个函数返回一个对象实例(非静态)域的值。
  • GetByteField
    This function returns the value of an instance (nonstatic) field of an object.
    这个函数返回一个对象实例(非静态)域的值。
  • GetCharField
    This function returns the value of an instance (nonstatic) field of an object.
    这个函数返回一个对象实例(非静态)域的值。
  • GetShortField
    This function returns the value of an instance (nonstatic) field of an object.
    这个函数返回一个对象实例(非静态)域的值。
  • GetIntField
    This function returns the value of an instance (nonstatic) field of an object.
    这个函数返回一个对象实例(非静态)域的值。
  • GetLongField
    This function returns the value of an instance (nonstatic) field of an object.
    这个函数返回一个对象实例(非静态)域的值。
  • GetFloatField
    This function returns the value of an instance (nonstatic) field of an object.
    这个函数返回一个对象实例(非静态)域的值。
  • GetDoubleField
    This function returns the value of an instance (nonstatic) field of an object.
    这个函数返回一个对象实例(非静态)域的值。
  • SetStringField
    This function sets the value of an instance (nonstatic) field of an object.
    这个函数设置一个对象实例(非静态)域的值。
  • SetObjectField
    This function sets the value of an instance (nonstatic) field of an object.
    这个函数设置一个对象实例(非静态)域的值。
  • SetBooleanField
    This function sets the value of an instance (nonstatic) field of an object.
    这个函数设置一个对象实例(非静态)域的值。
  • SetByteField
    This function sets the value of an instance (nonstatic) field of an object.
    这个函数设置一个对象实例(非静态)域的值。
  • SetCharField
    This function sets the value of an instance (nonstatic) field of an object.
    这个函数设置一个对象实例(非静态)域的值。
  • SetShortField
    This function sets the value of an instance (nonstatic) field of an object.
    这个函数设置一个对象实例(非静态)域的值。
  • SetIntField
    This function sets the value of an instance (nonstatic) field of an object.
    这个函数设置一个对象实例(非静态)域的值。
  • SetLongField
    This function sets the value of an instance (nonstatic) field of an object.
    这个函数设置一个对象实例(非静态)域的值。
  • SetFloatField
    This function sets the value of an instance (nonstatic) field of an object.
    这个函数设置一个对象实例(非静态)域的值。
  • SetDoubleField
    This function sets the value of an instance (nonstatic) field of an object.
    这个函数设置一个对象实例(非静态)域的值。
  • CallStaticStringMethod
    Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
    在一个Java对象调用一个静态方法,根据指定的methodID,可选传递参数(args)的数组到该方法。
  • CallStaticObjectMethod
    Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
    在一个Java对象调用一个静态方法,根据指定的methodID,可选传递参数(args)的数组到该方法。
  • CallStaticIntMethod
    Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
    在一个Java对象调用一个静态方法,根据指定的methodID,可选传递参数(args)的数组到该方法。
  • CallStaticBooleanMethod
    Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
    在一个Java对象调用一个静态方法,根据指定的methodID,可选传递参数(args)的数组到该方法。
  • CallStaticShortMethod
    Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
    在一个Java对象调用一个静态方法,根据指定的methodID,可选传递参数(args)的数组到该方法。
  • CallStaticByteMethod
    Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
    在一个Java对象调用一个静态方法,根据指定的methodID,可选传递参数(args)的数组到该方法。
  • CallStaticCharMethod
    Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
    在一个Java对象调用一个静态方法,根据指定的methodID,可选传递参数(args)的数组到该方法。
  • CallStaticFloatMethod
    Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
    在一个Java对象调用一个静态方法,根据指定的methodID,可选传递参数(args)的数组到该方法。
  • CallStaticDoubleMethod
    Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
    在一个Java对象调用一个静态方法,根据指定的methodID,可选传递参数(args)的数组到该方法。
  • CallStaticLongMethod
    Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
    在一个Java对象调用一个静态方法,根据指定的methodID,可选传递参数(args)的数组到该方法。
  • CallStaticVoidMethod
    Invokes a static method on a Java object, according to the specified methodID, optionally passing an array of arguments (args) to the method.
    在一个Java对象调用一个静态方法,根据指定的methodID,可选传递参数(args)的数组到该方法。
  • GetStaticStringField
    This function returns the value of a static field of an object.
    这个函数返回一个对象静态域的值。
  • GetStaticObjectField
    This function returns the value of a static field of an object.
    这个函数返回一个对象静态域的值。
  • GetStaticBooleanField
    This function returns the value of a static field of an object.
    这个函数返回一个对象静态域的值。
  • GetStaticByteField
    This function returns the value of a static field of an object.
    这个函数返回一个对象静态域的值。
  • GetStaticCharField
    This function returns the value of a static field of an object.
    这个函数返回一个对象静态域的值。
  • GetStaticShortField
    This function returns the value of a static field of an object.
    这个函数返回一个对象静态域的值。
  • GetStaticIntField
    This function returns the value of a static field of an object.
    这个函数返回一个对象静态域的值。
  • GetStaticLongField
    This function returns the value of a static field of an object.
    这个函数返回一个对象静态域的值。
  • GetStaticFloatField
    This function returns the value of a static field of an object.
    这个函数返回一个对象静态域的值。
  • GetStaticDoubleField
    This function returns the value of a static field of an object.
    这个函数返回一个对象静态域的值。
  • SetStaticStringField
    This function ets the value of a static field of an object.
    这个函数设置一个对象的静态域的值。
  • SetStaticObjectField
    This function ets the value of a static field of an object.
    这个函数设置一个对象的静态域的值。
  • SetStaticBooleanField
    This function ets the value of a static field of an object.
    这个函数设置一个对象的静态域的值。
  • SetStaticByteField
    This function ets the value of a static field of an object.
    这个函数设置一个对象的静态域的值。
  • SetStaticCharField
    This function ets the value of a static field of an object.
    这个函数设置一个对象的静态域的值。
  • SetStaticShortField
    This function ets the value of a static field of an object.
    这个函数设置一个对象的静态域的值。
  • SetStaticIntField
    This function ets the value of a static field of an object.
    这个函数设置一个对象的静态域的值。
  • SetStaticLongField
    This function ets the value of a static field of an object.
    这个函数设置一个对象的静态域的值。
  • SetStaticFloatField
    This function ets the value of a static field of an object.
    这个函数设置一个对象的静态域的值。
  • SetStaticDoubleField
    This function ets the value of a static field of an object.
    这个函数设置一个对象的静态域的值。
  • ToBooleanArray
    Convert a managed array of System.Boolean to a Java array of boolean.
    转换一个System.Boolean的托管数组到一个Java布尔数组。
  • ToByteArray
    Convert a managed array of System.Byte to a Java array of byte.
    转换一个System.Byte的托管数组到一个Java的字节数组。
  • ToCharArray
    Convert a managed array of System.Char to a Java array of char.
    转换一个System.Char的托管数组到一个Java的字符数组。
  • ToShortArray
    Convert a managed array of System.Int16 to a Java array of short.
    转换一个System.Int16的托管数组到一个Java的短整数数组。
  • ToIntArray
    Convert a managed array of System.Int32 to a Java array of int.
    转换一个System.Int32的托管数组到一个Java的整数数组。
  • ToLongArray
    Convert a managed array of System.Int64 to a Java array of long.
    转换一个System.Int64的托管数组到一个Java的长整数数组。
  • ToFloatArray
    Convert a managed array of System.Single to a Java array of float.
    转换一个System.Single的托管数组到一个Java的浮点数数组。
  • ToDoubleArray
    Convert a managed array of System.Double to a Java array of double.
    转换一个System.Double的托管数组到一个Java的双精度浮点数数组。
  • ToObjectArray
    Convert a managed array of System.IntPtr, representing Java objects, to a Java array of java.lang.Object.
    转换一个System.IntPtr的托管数组,表示Java对象,到一个Java的java.lang.Object数组。
  • FromBooleanArray
    Convert a Java array of boolean to a managed array of System.Boolean.
    转换一个Java布尔数组到一个托管System.Boolean数组。
  • FromByteArray
    Convert a Java array of byte to a managed array of System.Byte.
    转换一个Java字节数组到一个托管的System.Byte数组。
  • FromCharArray
    Convert a Java array of char to a managed array of System.Char.
    转换一个Java字符数组到一个托管的System.Char数组。
  • FromShortArray
    Convert a Java array of short to a managed array of System.Int16.
    转换一个Java短整数数组到一个托管的System.Int16数组。
  • FromIntArray
    Convert a Java array of int to a managed array of System.Int32.
    转换一个Java整数数组到一个托管的System.Int32数组。
  • FromLongArray
    Convert a Java array of long to a managed array of System.Int64.
    转换一个Java长整数数组到一个托管的System.Int64数组。
  • FromFloatArray
    Convert a Java array of float to a managed array of System.Single.
    转换一个Java浮点数数组到一个托管的System.Single数组。
  • FromDoubleArray
    Convert a Java array of double to a managed array of System.Double.
    转换一个Java双精度浮点数数组到一个托管的System.Double数组。
  • FromObjectArray
    Convert a Java array of java.lang.Object to a managed array of System.IntPtr, representing Java objects.
    转换一个Java的java.lang.Object数组到一个托管的System.IntPtr数组,表示Java对象。
  • GetArrayLength
    Returns the number of elements in the array.
    返回数组的元素数。
  • NewBooleanArray
    Construct a new primitive array object.
    构造一个新的基本数组对象。
  • NewByteArray
    Construct a new primitive array object.
    构造一个新的基本数组对象。
  • NewCharArray
    Construct a new primitive array object.
    构造一个新的基本数组对象。
  • NewShortArray
    Construct a new primitive array object.
    构造一个新的基本数组对象。
  • NewIntArray
    Construct a new primitive array object.
    构造一个新的基本数组对象。
  • NewLongArray
    Construct a new primitive array object.
    构造一个新的基本数组对象。
  • NewFloatArray
    Construct a new primitive array object.
    构造一个新的基本数组对象。
  • NewDoubleArray
    Construct a new primitive array object.
    构造一个新的基本数组对象。
  • NewObjectArray
    Constructs a new array holding objects in class clazz. All elements are initially set to obj.
    构造新的数组,它将保存在类 clazz 中的对象。所有元素初始值均设为 obj。
  • GetBooleanArrayElement
    Returns the value of one element of a primitive array.
    返回一个基本数组一个元素的值。
  • GetByteArrayElement
    Returns the value of one element of a primitive array.
    返回一个基本数组一个元素的值。
  • GetCharArrayElement
    Returns the value of one element of a primitive array.
    返回一个基本数组一个元素的值。
  • GetShortArrayElement
    Returns the value of one element of a primitive array.
    返回一个基本数组一个元素的值。
  • GetIntArrayElement
    Returns the value of one element of a primitive array.
    返回一个基本数组一个元素的值。
  • GetLongArrayElement
    Returns the value of one element of a primitive array.
    返回一个基本数组一个元素的值。
  • GetFloatArrayElement
    Returns the value of one element of a primitive array.
    返回一个基本数组一个元素的值。
  • GetDoubleArrayElement
    Returns the value of one element of a primitive array.
    返回一个基本数组一个元素的值。
  • GetObjectArrayElement
    Returns an element of an Object array.
    返回一个对象数组的一个元素。
  • SetBooleanArrayElement
    Sets the value of one element in a primitive array.
    设置一个基本数组一个元素的值。
  • SetByteArrayElement
    Sets the value of one element in a primitive array.
    设置一个基本数组一个元素的值。
  • SetCharArrayElement
    Sets the value of one element in a primitive array.
    设置一个基本数组一个元素的值。
  • SetShortArrayElement
    Sets the value of one element in a primitive array.
    设置一个基本数组一个元素的值。
  • SetIntArrayElement
    Sets the value of one element in a primitive array.
    设置一个基本数组一个元素的值。
  • SetLongArrayElement
    Sets the value of one element in a primitive array.
    设置一个基本数组一个元素的值。
  • SetFloatArrayElement
    Sets the value of one element in a primitive array.
    设置一个基本数组一个元素的值。
  • SetDoubleArrayElement
    Sets the value of one element in a primitive array.
    设置一个基本数组一个元素的值。
  • SetObjectArrayElement
    Sets an element of an Object array.
    设置一个对象数组的一个元素。


原创粉丝点击