JniEnvironment.StaticFields.GetStaticFieldID メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| Name | 説明 |
|---|---|
| GetStaticFieldID(JniObjectReference, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>) |
UTF-8 名と署名スパンを使用して JNI 静的フィールド ID を検索します。
文字列マーシャリングのオーバーヘッドを回避するには、 |
| GetStaticFieldID(JniObjectReference, String, String) |
JNI 静的フィールド識別子を解決します。 |
GetStaticFieldID(JniObjectReference, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)
UTF-8 名と署名スパンを使用して JNI 静的フィールド ID を検索します。
文字列マーシャリングのオーバーヘッドを回避するには、 "fieldName"u8 リテラルと共に使用します。
public static Java.Interop.JniFieldInfo GetStaticFieldID(Java.Interop.JniObjectReference type, ReadOnlySpan<byte> name, ReadOnlySpan<byte> signature);
static member GetStaticFieldID : 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例外は、マネージド例外に変換されます。
適用対象
GetStaticFieldID(JniObjectReference, String, String)
JNI 静的フィールド識別子を解決します。
public static Java.Interop.JniFieldInfo GetStaticFieldID(Java.Interop.JniObjectReference type, string name, string signature);
static member GetStaticFieldID : Java.Interop.JniObjectReference * string * string -> Java.Interop.JniFieldInfo
パラメーター
- type
- JniObjectReference
フィールド参照に使用されるJava クラスへの有効な参照。
- name
- String
Java フィールド名。
- signature
- String
JNI フィールド記述子。
戻り値
静的フィールドの有効な JNI フィールド情報。