AndroidJNIHelper.GetFieldID 获取域ID


static function GetFieldID (javaClass : IntPtr, fieldName : string, signature : string = "", isStatic : bool = false) : IntPtr

Parameters参数

  • javaClass
    Raw JNI Java class object (obtained by calling AndroidJNI.FindClass).
       原始JNI Java类对象。(通过调用AndroidJNI.FindClass)
  • fieldName
    Name of the field as declared in Java.
  • signature
    Field  signature (e.g. obtained by calling AndroidJNIHelper.GetSignature).
       域签名(例如通过调用AndroidJNIHelper.GetSignature)。
  • isStatic
    Set to true for static methods; false for instance (nonstatic) methods.
       设置为true为静态方法;false为实例(非静态)方法。

Description描述

Scans a particular Java class for a field 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 field with the correct name will be returned.

签名比较是为了允许类的类型的 sub-/base-classes。如果没有提供

签名,具有正确的名称的首个域将被返回。


参见:AndroidJNIHelper.GetSignature, AndroidJNIHelper.GetConstructorID, AndroidJNIHelper.GetMethodID


,