JniRuntime.JniValueManager Class
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.
Defines managed peer registration, lifetime control, and JNI value conversion.
public abstract class JniRuntime.JniValueManager : IDisposable
type JniRuntime.JniValueManager = class
interface JniRuntime.ISetRuntime
interface IDisposable
- Inheritance
-
JniRuntime.JniValueManager
- Derived
- Implements
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
| Name | Description |
|---|---|
| JniRuntime.JniValueManager() |
Initializes the value manager base class. |
Properties
| Name | Description |
|---|---|
| Runtime |
Gets the runtime assigned to this value manager. |
Methods
| Name | Description |
|---|---|
| ActivatePeer(IJavaPeerable, JniObjectReference, ConstructorInfo, Object[]) |
Provides the legacy activation hook with an optional existing managed peer. |
| ActivatePeer(JniObjectReference, Type, ConstructorInfo, Object[]) |
Activates a managed peer for a Java instance through the derived implementation. |
| AddPeer(IJavaPeerable) |
Registers a managed peer in the Java-to-managed mapping. |
| CollectPeers() |
Requests peer collection through the runtime-specific implementation. |
| ConstructPeer(IJavaPeerable, JniObjectReference, JniObjectReferenceOptions) |
Delegates peer initialization to |
| ConstructPeerCore(IJavaPeerable, JniObjectReference, JniObjectReferenceOptions) |
Defines the implementation's peer construction and reference-transfer policy. |
| CreateLocalObjectReferenceArgument(Type, Object) |
Creates a local JNI argument reference through the implementation hook. |
| CreateLocalObjectReferenceArgumentCore(Type, Object) |
Defines creation of a local JNI object-reference argument. |
| CreatePeer(JniObjectReference, JniObjectReferenceOptions, Type) |
Creates a managed peer wrapper according to the derived implementation. |
| CreateValue(JniObjectReference, JniObjectReferenceOptions, Type) |
Creates a managed value through the creation hook after checking manager disposal. |
| CreateValue<T>(JniObjectReference, JniObjectReferenceOptions, Type) |
Creates a typed managed value through the creation hook. |
| CreateValueCore(JniObjectReference, JniObjectReferenceOptions, Type) |
Defines non-generic managed value creation from a JNI reference. |
| CreateValueCore<T>(JniObjectReference, JniObjectReferenceOptions, Type) |
Defines typed managed value creation from a JNI reference. |
| Dispose() |
Calls managed disposal and suppresses finalization. |
| Dispose(Boolean) |
Marks the manager as disposed. |
| DisposePeer(IJavaPeerable) |
Runs disposal notification, removes the peer mapping, and releases its JNI reference. |
| DisposePeerUnlessReferenced(IJavaPeerable) |
Releases the peer reference unless the mapping still points to this managed instance. |
| EnsureNotDisposed() |
Throws ObjectDisposedException when the manager has been disposed. |
| FinalizePeer(IJavaPeerable) |
Applies the runtime-specific finalization policy to a managed peer. |
| GetJniIdentityHashCode(JniObjectReference) |
Gets the Java identity hash through the runtime's System helper. |
| GetPeer(JniObjectReference, Type) |
Reuses a compatible mapped peer or creates one with Copy transfer options. |
| GetSurfacedPeers() |
Gets diagnostic information about the implementation's surfaced peer mappings. |
| GetValue(JniObjectReference, JniObjectReferenceOptions, Type) |
Looks up or converts a managed value through the lookup hook. |
| GetValue<T>(IntPtr) |
Looks up or converts a raw JNI handle with Copy transfer options. |
| GetValue<T>(JniObjectReference, JniObjectReferenceOptions, Type) |
Looks up or converts a typed managed value through the lookup hook. |
| GetValueCore(JniObjectReference, JniObjectReferenceOptions, Type) |
Defines non-generic managed value lookup and conversion. |
| GetValueCore<T>(JniObjectReference, JniObjectReferenceOptions, Type) |
Defines typed managed value lookup and conversion. |
| GetValueMarshaler(Type) |
Gets a marshaler through the type-based lookup hook. |
| GetValueMarshaler<T>() |
Gets a typed marshaler through the generic lookup hook. |
| GetValueMarshalerCore(Type) |
Defines the type-based value-marshaler lookup policy. |
| GetValueMarshalerCore<T>() |
Defines the generic value-marshaler lookup policy. |
| OnSetRuntime(JniRuntime) |
Associates the manager with a runtime after checking disposal. |
| PeekPeer(JniObjectReference) |
Looks up an existing managed peer without creating one. |
| PeekValue(JniObjectReference) |
Looks up a peer and unwraps known managed proxy values. |
| RemovePeer(IJavaPeerable) |
Removes a peer mapping without defining JNI reference disposal. |
| TryConstructPeer(IJavaPeerable, JniObjectReference, JniObjectReferenceOptions, Type) |
Invokes an activation constructor on an existing managed peer when one is found. |
| TryUnboxPeerObject(IJavaPeerable, Object) |
Unwraps the built-in managed-object and exception proxy types. |
| WaitForGCBridgeProcessing() |
Provides the GC-bridge coordination hook used before JNI callbacks. |