AndroidJNIHelper.GetMethodID.<ReturnType> 获取方法ID


static function GetMethodID.<ReturnType> (jclass : System.IntPtr, methodName : string, args : object[], isStatic : bool) : System.IntPtr

Parameters参数

  • javaClass
    Raw JNI Java class object (obtained by calling AndroidJNI.FindClass).
       原JNI类对象
  • methodName
    Name of the method as declared in Java.
       在Java定义的方法名
  • args
    Array with parameters to be passed to the method when invoked.
          在调用时,带有参数的数组传递给方法。
  • isStatic
    Set 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。


,