Language

JniRuntime.JniValueManager.GetValue Method

Definition

Overloads

Name Description
GetValue(JniObjectReference, JniObjectReferenceOptions, Type)

Looks up or converts a managed value through the lookup hook.

GetValue<T>(IntPtr)

Looks up or converts a raw JNI handle with Copy transfer options.

GetValue<T>(JniObjectReference, JniObjectReferenceOptions, Type)

Looks up or converts a typed managed value through the lookup hook.

GetValue(JniObjectReference, JniObjectReferenceOptions, Type)

Looks up or converts a managed value through the lookup hook.

public object? GetValue(ref Java.Interop.JniObjectReference reference, Java.Interop.JniObjectReferenceOptions options, Type? targetType = default);
member this.GetValue : JniObjectReference * Java.Interop.JniObjectReferenceOptions * Type -> obj

Parameters

reference
JniObjectReference

The JNI reference supplied to the conversion implementation.

options
JniObjectReferenceOptions

Reference-transfer options forwarded to the conversion implementation.

targetType
Type

The optional requested managed target type.

Returns

The existing or converted value produced by the lookup implementation.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetValue<T>(IntPtr)

Looks up or converts a raw JNI handle with Copy transfer options.

public T GetValue<T>(IntPtr handle);
member this.GetValue : nativeint -> 'T

Type Parameters

T

The managed result type.

Parameters

handle
IntPtr

nativeint

The borrowed JNI handle to look up without consuming its reference.

Returns

T

The typed result supplied by the ref-reference GetValue overload.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetValue<T>(JniObjectReference, JniObjectReferenceOptions, Type)

Looks up or converts a typed managed value through the lookup hook.

public T GetValue<T>(ref Java.Interop.JniObjectReference reference, Java.Interop.JniObjectReferenceOptions options, Type? targetType = default);
member this.GetValue : JniObjectReference * Java.Interop.JniObjectReferenceOptions * Type -> 'T

Type Parameters

T

The managed result type.

Parameters

reference
JniObjectReference

The JNI reference supplied to the conversion implementation.

options
JniObjectReferenceOptions

Reference-transfer options forwarded to the conversion implementation.

targetType
Type

The optional requested managed target type.

Returns

T

The existing or converted value produced by the lookup implementation.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to