JniRuntime.JniValueManager.GetPeer(JniObjectReference, Type) 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.
Reuses a compatible mapped peer or creates one with Copy transfer options.
public Java.Interop.IJavaPeerable? GetPeer(Java.Interop.JniObjectReference reference, Type? targetType = default);
member this.GetPeer : Java.Interop.JniObjectReference * Type -> Java.Interop.IJavaPeerable
Parameters
- reference
- JniObjectReference
The Java object reference to wrap or look up.
- targetType
- Type
The optional managed peer type required for a reused mapping.
Returns
A compatible existing or created peer, or null for a zero reference or incompatible conversion.
Remarks
The source reference is not consumed by this lookup.