Language

JniEnvironment.InstanceFields.GetFieldID メソッド

定義

オーバーロード

Name 説明
GetFieldID(JniObjectReference, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

UTF-8 の名前と署名スパンを使用して JNI インスタンス フィールド ID を検索します。 文字列マーシャリングのオーバーヘッドを回避するには、 "fieldName"u8 リテラルと共に使用します。

GetFieldID(JniObjectReference, String, String)

JNI インスタンス フィールド識別子を解決します。

GetFieldID(JniObjectReference, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

UTF-8 の名前と署名スパンを使用して JNI インスタンス フィールド ID を検索します。 文字列マーシャリングのオーバーヘッドを回避するには、 "fieldName"u8 リテラルと共に使用します。

public static Java.Interop.JniFieldInfo GetFieldID(Java.Interop.JniObjectReference type, ReadOnlySpan<byte> name, ReadOnlySpan<byte> signature);
static member GetFieldID : Java.Interop.JniObjectReference * ReadOnlySpan<byte> * ReadOnlySpan<byte> -> Java.Interop.JniFieldInfo

パラメーター

type
JniObjectReference

フィールド参照に使用されるJava クラスへの有効な参照。

name
ReadOnlySpan<Byte>

変更された UTF-8 としてエンコードされたJava フィールド名。

signature
ReadOnlySpan<Byte>

変更された UTF-8 としてエンコードされた JNI フィールド記述子。

戻り値

インスタンス・フィールドの有効な JNI フィールド情報。

注釈

両方のバイト シーケンスをメモリ内で終了する必要があります。 各ゼロ ターミネータは、 u8 文字列リテラルと同様に、スパン内でも直後でもかまいません。 これらのバイトは、コード変換や長さの引数なしで JNI に渡されます。 ルックアップからの保留中のJava例外は、マネージド例外に変換されます。

適用対象

GetFieldID(JniObjectReference, String, String)

JNI インスタンス フィールド識別子を解決します。

public static Java.Interop.JniFieldInfo GetFieldID(Java.Interop.JniObjectReference type, string name, string signature);
static member GetFieldID : Java.Interop.JniObjectReference * string * string -> Java.Interop.JniFieldInfo

パラメーター

type
JniObjectReference

フィールド参照に使用されるJava クラスへの有効な参照。

name
String

Java フィールド名。

signature
String

JNI フィールド記述子。

戻り値

インスタンス・フィールドの有効な JNI フィールド情報。

注釈

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象