Language

JniRuntime.ReflectionJniValueManager.ActivatePeer Method

Definition

Allocates an uninitialized managed peer and invokes its activation constructor.

public override void ActivatePeer(Java.Interop.JniObjectReference reference, Type type, System.Reflection.ConstructorInfo cinfo, object?[]? argumentValues);
override this.ActivatePeer : Java.Interop.JniObjectReference * Type * System.Reflection.ConstructorInfo * obj[] -> unit

Parameters

reference
JniObjectReference

The Java peer reference stored before constructor invocation.

type
Type

The managed type to allocate without first running a constructor.

cinfo
ConstructorInfo

The constructor to invoke on the allocated instance.

argumentValues
Object[]

The constructor argument values.

Remarks

Activation failures are wrapped in NotSupportedException with diagnostic peer information.

Applies to