AndroidJNIHelper.GetMethodID 获取方法ID
static function GetMethodID (javaClass : IntPtr, methodName : string, signature : string = "", isStatic : bool = false) : IntPtr
Parameters参数
-
javaClassRaw JNI Java class object (obtained by calling AndroidJNI.FindClass).
原始JNI Java类对象。(通过调用AndroidJNI.FindClass) - methodNameName of the method as declared in Java.
在Java所声明的方法名。 -
signatureMethod signature (e.g. obtained by calling AndroidJNIHelper.GetSignature).
方法签名(例如通过调用AndroidJNIHelper.GetSignature)。 - isStaticSet to true for static methods; false for instance (nonstatic) methods.
设置为true为静态方法;false为实例(非静态)方法。
Description描述
Scans a particular Java class for a method matching a name and a signature.
扫描一个特定的Java类,用于一个方法匹配一个名字和一个签名。
The signature comparison is done to allow sub-/base-classes of a class types. If no signature is provided the first method with the correct name will be returned.
签名比较是为了允许类的类型的 sub-/base-classes。如果没有提供签名,具有正确的名称的首个方法将被返回。
参见: AndroidJNIHelper.GetSignature, AndroidJNIHelper.GetConstructorID, AndroidJNIHelper.GetFieldID
• static function GetMethodID (jclass : System.IntPtr, methodName : string, args : object[], isStatic : bool) : System.IntPtr
Parameters参数
-
javaClassRaw JNI Java class object (obtained by calling AndroidJNI.FindClass).
原始JNI Java类对象。(通过调用AndroidJNI.FindClass) - methodNameName of the method as declared in Java.
在Java所声明的方法名。 -
argsArray with parameters to be passed to the constructor when invoked.
当调用时,带有参数的阵列传递到构造函数 - isStaticSet to true for static methods; false for instance (nonstatic) methods.
设置为true为静态方法;false为实例(非静态)方法。
Description描述
Get a JNI method ID based on calling arguments.
获取一个JNI方法ID,根据调用参数。
Generic parameter represents the method return type, and the regular method assumes 'void' return type. Scans a particular Java class for a method matching a signature based on passed arguments. The signature comparison is done to allow for sub-/base-classes of the class types.
泛型参数表示该方法的返回类型,和常规方法假设为void返回类型。扫描一个特定Java类用于一个方法匹配一个签名,根据传递的参数。签名比较是为了允许类的类型的sub-/base-classes。