JniRuntime.ReflectionJniValueManager.CreateValueCore メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| Name | 説明 |
|---|---|
| CreateValueCore(JniObjectReference, JniObjectReferenceOptions, Type) |
ピア、プロキシ、または選択した値マーシャラー変換を使用して、マネージド値を作成します。 |
| CreateValueCore<T>(JniObjectReference, JniObjectReferenceOptions, Type) |
要求されたターゲットの型を検証した後、型指定されたマネージド値を作成します。 |
CreateValueCore(JniObjectReference, JniObjectReferenceOptions, Type)
ピア、プロキシ、または選択した値マーシャラー変換を使用して、マネージド値を作成します。
protected override object? CreateValueCore(ref Java.Interop.JniObjectReference reference, Java.Interop.JniObjectReferenceOptions options, Type? targetType = default);
override this.CreateValueCore : JniObjectReference * Java.Interop.JniObjectReferenceOptions * Type -> obj
パラメーター
- reference
- JniObjectReference
変換するソース JNI 参照。
- options
- JniObjectReferenceOptions
ソース参照転送オプション。
- targetType
- Type
省略可能なマネージド ターゲットの種類。 省略すると、既存のプロキシ値を直接返すことができます。または、使用可能な場合はランタイム型を使用できます。
戻り値
変換された値。 nullできます。 0 個の JNI 参照は nullを返します。
注釈
既知のマネージド プロキシは、 Convert.ChangeTypeを使用してラップ解除および変換できます。
適用対象
CreateValueCore<T>(JniObjectReference, JniObjectReferenceOptions, Type)
要求されたターゲットの型を検証した後、型指定されたマネージド値を作成します。
protected override T CreateValueCore<T>(ref Java.Interop.JniObjectReference reference, Java.Interop.JniObjectReferenceOptions options, Type? targetType = default);
override this.CreateValueCore : JniObjectReference * Java.Interop.JniObjectReferenceOptions * Type -> 'T
型パラメーター
- T
マネージド結果の種類。
パラメーター
- reference
- JniObjectReference
変換するソース JNI 参照。
- options
- JniObjectReferenceOptions
ソース参照転送オプション。
- targetType
- Type
要求された互換性のあるランタイム ターゲット、またはnullするときにtypeof(T)。
戻り値
変換された型指定された値。 default(T)できます。 ゼロ参照は default(T)を返します。
注釈
有効な JNI 参照の場合、targetTypeTに割り当てられないと、ArgumentExceptionが発生します。