JavaPeerProxy.CreateInstance(IntPtr, JniHandleOwnership) 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.
Creates an instance of the target type using the JNI handle and ownership semantics. This replaces the reflection-based constructor invocation used in the legacy path.
public abstract Java.Interop.IJavaPeerable? CreateInstance(IntPtr handle, Android.Runtime.JniHandleOwnership transfer);
abstract member CreateInstance : nativeint * Android.Runtime.JniHandleOwnership -> Java.Interop.IJavaPeerable
Parameters
- handle
-
IntPtr
nativeint
The JNI object reference handle.
- transfer
- JniHandleOwnership
How to handle JNI reference ownership.
Returns
A new instance of the target type wrapping the JNI handle, or null if activation is not supported.