Language

JniRuntime.ReflectionJniValueManager.TryConstructPeer Method

Definition

Invokes an activation constructor and applies reference-transfer cleanup.

protected virtual bool TryConstructPeer(Java.Interop.IJavaPeerable self, ref Java.Interop.JniObjectReference reference, Java.Interop.JniObjectReferenceOptions options, Type type);
abstract member TryConstructPeer : Java.Interop.IJavaPeerable * JniObjectReference * Java.Interop.JniObjectReferenceOptions * Type -> bool
override this.TryConstructPeer : Java.Interop.IJavaPeerable * JniObjectReference * Java.Interop.JniObjectReferenceOptions * Type -> bool

Parameters

self
IJavaPeerable

The already allocated managed peer to initialize.

reference
JniObjectReference

The source reference passed to the activation constructor by reference.

options
JniObjectReferenceOptions

Reference-transfer options passed to the constructor and subsequent disposal.

type
Type

The type whose public or non-public activation constructor is searched.

Returns

true when a matching constructor was invoked; otherwise, false.

Remarks

Searches for (ref JniObjectReference, JniObjectReferenceOptions), updates reference from the invocation arguments, then applies source disposal.

Applies to