Object.GetObject Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetObject<T>(IntPtr, IntPtr, JniHandleOwnership) | |
GetObject<T>(IntPtr, JniHandleOwnership) |
Wraps a JNI object reference into a fully typed IJavaObject implementation. |
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
nativeint
- handle
-
IntPtr
nativeint
- transfer
- JniHandleOwnership
Returns
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
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
- transfer
- JniHandleOwnership
Returns
A T
instance which references that Android
object instance handle
.
Exceptions
handle
is not of the appropriate type,
as determied by M:Android.Runtime.JNIEnv.IsInstanceOf.
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.