Language

JniRuntime.ReflectionJniValueManager Class

Definition

Implements peer construction and value conversion using managed reflection.

public abstract class JniRuntime.ReflectionJniValueManager : Java.Interop.JniRuntime.JniValueManager
type JniRuntime.ReflectionJniValueManager = class
    inherit JniRuntime.JniValueManager
Inheritance
JniRuntime.ReflectionJniValueManager

Remarks

This implementation requires reflection and dynamic-code support and is not compatible with Native AOT.

Constructors

Name Description
JniRuntime.ReflectionJniValueManager()

Initializes the reflection-based value manager.

Properties

Name Description
Runtime

Gets the runtime assigned to this value manager.

(Inherited from JniRuntime.JniValueManager)

Methods

Name Description
ActivatePeer(JniObjectReference, Type, ConstructorInfo, Object[])

Allocates an uninitialized managed peer and invokes its activation constructor.

AddPeer(IJavaPeerable)

Registers a managed peer in the Java-to-managed mapping.

(Inherited from JniRuntime.JniValueManager)
CollectPeers()

Requests peer collection through the runtime-specific implementation.

(Inherited from JniRuntime.JniValueManager)
ConstructPeer(IJavaPeerable, JniObjectReference, JniObjectReferenceOptions)

Initializes a managed peer. In .NET 11 for Android, delegates initialization to ConstructPeerCore.

(Inherited from JniRuntime.JniValueManager)
ConstructPeerCore(IJavaPeerable, JniObjectReference, JniObjectReferenceOptions)

Unless initialization is deferred or an existing activation reference is reused, initializes the peer reference and identity hash and registers the peer when the options permit it.

CreateLocalObjectReferenceArgument(Type, Object)

Creates a local JNI argument reference through the implementation hook.

(Inherited from JniRuntime.JniValueManager)
CreateLocalObjectReferenceArgumentCore(Type, Object)

Creates a local reference from temporary object-reference argument state.

CreateNonArrayListValue(JniObjectReference, JniObjectReferenceOptions, Type)

Rejects non-array Java list conversion in the default implementation.

CreatePeer(JniObjectReference, JniObjectReferenceOptions, Type)

Finds and constructs a compatible managed wrapper for a Java object.

CreateValue(JniObjectReference, JniObjectReferenceOptions, Type)

Creates a managed value after checking manager disposal. In .NET 11 for Android, delegates creation to the creation hook.

(Inherited from JniRuntime.JniValueManager)
CreateValue<T>(JniObjectReference, JniObjectReferenceOptions, Type)

Creates a typed managed value. In .NET 11 for Android, delegates creation to the creation hook.

(Inherited from JniRuntime.JniValueManager)
CreateValueCore(JniObjectReference, JniObjectReferenceOptions, Type)

Creates a managed value using peer, proxy, or selected value-marshaler conversion.

CreateValueCore<T>(JniObjectReference, JniObjectReferenceOptions, Type)

Creates a typed managed value after validating the requested target type.

Dispose()

Calls managed disposal and suppresses finalization.

(Inherited from JniRuntime.JniValueManager)
Dispose(Boolean)

Marks the manager as disposed.

(Inherited from JniRuntime.JniValueManager)
DisposePeer(IJavaPeerable)

In the base implementation, notifies a peer with a valid JNI reference and removes its mapping. If the reference is still valid after those calls, it disposes the reference.

(Inherited from JniRuntime.JniValueManager)
DisposePeerUnlessReferenced(IJavaPeerable)

In the base implementation, starts disposal when the peer has a valid reference and is not mapped to the same instance.

(Inherited from JniRuntime.JniValueManager)
EnsureNotDisposed()

Throws ObjectDisposedException when the base disposal method has marked the manager as disposed.

(Inherited from JniRuntime.JniValueManager)
FinalizePeer(IJavaPeerable)

Applies the runtime-specific finalization policy to a managed peer.

(Inherited from JniRuntime.JniValueManager)
GetJniIdentityHashCode(JniObjectReference)

Gets the Java identity hash through the runtime's System helper.

(Inherited from JniRuntime.JniValueManager)
GetPeer(JniObjectReference, Type)

Reuses a compatible mapped peer or creates one with Copy transfer options.

(Inherited from JniRuntime.JniValueManager)
GetSurfacedPeers()

Gets diagnostic information about the implementation's surfaced peer mappings.

(Inherited from JniRuntime.JniValueManager)
GetValue(JniObjectReference, JniObjectReferenceOptions, Type)

Looks up or converts a managed value. In .NET 11 for Android, delegates lookup to the lookup hook.

(Inherited from JniRuntime.JniValueManager)
GetValue<T>(IntPtr)

Looks up or converts a raw JNI handle with Copy transfer options.

(Inherited from JniRuntime.JniValueManager)
GetValue<T>(JniObjectReference, JniObjectReferenceOptions, Type)

Looks up or converts a typed managed value. In .NET 11 for Android, delegates lookup to the lookup hook.

(Inherited from JniRuntime.JniValueManager)
GetValueCore(JniObjectReference, JniObjectReferenceOptions, Type)

Reuses a compatible existing mapped value before selecting a converter.

GetValueCore<T>(JniObjectReference, JniObjectReferenceOptions, Type)

Reuses a compatible mapped value or converts it to the requested managed type.

GetValueMarshaler(Type)

Gets a marshaler for a managed type. In .NET 11 for Android, delegates lookup to the type-based hook.

(Inherited from JniRuntime.JniValueManager)
GetValueMarshaler<T>()

Gets a typed marshaler. In .NET 11 for Android, delegates lookup to the generic hook.

(Inherited from JniRuntime.JniValueManager)
GetValueMarshalerCore(Type)

Selects an annotated, built-in, collection, peer, or proxy marshaler.

GetValueMarshalerCore<T>()

Gets a typed marshaler or a cached typed adapter.

OnSetRuntime(JniRuntime)

Associates the manager with a runtime after checking disposal.

(Inherited from JniRuntime.JniValueManager)
PeekPeer(JniObjectReference)

Looks up an existing managed peer without creating one.

(Inherited from JniRuntime.JniValueManager)
PeekValue(JniObjectReference)

Looks up a peer and unwraps known managed proxy values.

(Inherited from JniRuntime.JniValueManager)
RemovePeer(IJavaPeerable)

Removes a peer mapping without defining JNI reference disposal.

(Inherited from JniRuntime.JniValueManager)
TryConstructPeer(IJavaPeerable, JniObjectReference, JniObjectReferenceOptions, Type)

Invokes a matching activation constructor. If invocation succeeds, applies reference-transfer cleanup.

TryUnboxPeerObject(IJavaPeerable, Object)

Unwraps the built-in managed-object and exception proxy types.

(Inherited from JniRuntime.JniValueManager)
WaitForGCBridgeProcessing()

Provides the GC-bridge coordination hook used before JNI callbacks.

(Inherited from JniRuntime.JniValueManager)

Applies to