Unity3D圣典3.3版本-中文版
文集大纲加载中……
本文档使用 MrDoc 发布
-
+
首页
AndroidJNIHelper.GetMethodID 获取方法 ID
# [AndroidJNIHelper](AndroidJNIHelper.html).GetMethodID 获取方法 ID static function *GetMethodID* (*javaClass* : IntPtr, *methodName* : string, *signature* : string = "", *isStatic* : bool = false) : IntPtr ### Parameters**参数** * *javaClass* Raw JNI Java class object (obtained by calling [AndroidJNI.FindClass](../AndroidJNI/AndroidJNI.FindClass.html)). 原始 JNI Java 类对象。(通过调用 [AndroidJNI.FindClass](../AndroidJNI/AndroidJNI.FindClass.html)) * *methodName* Name of the method as declared in Java. 在 Java 所声明的方法名。 * *signature* Method signature (e.g. obtained by calling [AndroidJNIHelper.GetSignature](AndroidJNIHelper.GetSignature.html)). 方法签名(例如通过调用 [AndroidJNIHelper.GetSignature](AndroidJNIHelper.GetSignature.html))。 * *isStatic* Set 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.GetSignature.html), [AndroidJNIHelper.GetConstructorID](AndroidJNIHelper.GetConstructorID.html), [AndroidJNIHelper.GetFieldID](AndroidJNIHelper.GetFieldID.html) • static function *GetMethodID* (*jclass* : System.IntPtr, *methodName* : string, *args* : object[], *isStatic* : bool) : System.IntPtr ### Parameters**参数** * *javaClass* Raw JNI Java class object (obtained by calling [AndroidJNI.FindClass](../AndroidJNI/AndroidJNI.FindClass.html)). 原始 JNI Java 类对象。(通过调用 [AndroidJNI.FindClass](../AndroidJNI/AndroidJNI.FindClass.html)) * *methodName* Name of the method as declared in Java. 在 Java 所声明的方法名。 * *args* Array with parameters to be passed to the constructor 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。
da
2022年5月13日 22:01
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码