Object.GetObject Object.GetObject Method

Definition

Overloads

GetObject<T>(IntPtr, IntPtr, JniHandleOwnership) GetObject<T>(IntPtr, IntPtr, JniHandleOwnership)
GetObject<T>(IntPtr, JniHandleOwnership) GetObject<T>(IntPtr, JniHandleOwnership)

Wraps a JNI object reference into a fully typed IJavaObject implementation.

GetObject<T>(IntPtr, IntPtr, JniHandleOwnership) GetObject<T>(IntPtr, IntPtr, JniHandleOwnership)

public static T GetObject<T> (IntPtr jnienv, IntPtr handle, Android.Runtime.JniHandleOwnership transfer) where T : class, Android.Runtime.IJavaObject;
static member GetObject : nativeint * nativeint * Android.Runtime.JniHandleOwnership -> 'T (requires 'T : null and 'T :> Android.Runtime.IJavaObject)

Type Parameters

T

Parameters

jnienv
IntPtr IntPtr
handle
IntPtr IntPtr

Returns

T T

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.

GetObject<T>(IntPtr, JniHandleOwnership) GetObject<T>(IntPtr, JniHandleOwnership)

Wraps a JNI object reference into a fully typed IJavaObject implementation.

public static T GetObject<T> (IntPtr handle, Android.Runtime.JniHandleOwnership transfer) where T : class, Android.Runtime.IJavaObject;
static member GetObject : nativeint * Android.Runtime.JniHandleOwnership -> 'T (requires 'T : null and 'T :> Android.Runtime.IJavaObject)

Type Parameters

T

The type of the object to return. This type must be a reference type and implement the IJavaObject interface.

Parameters

handle
IntPtr IntPtr

A IntPtr containing a Java Native Interface (JNI) object reference.

Returns

T T

A T instance which references that Android object instance handle.

Exceptions

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