JniRuntime 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.
Coordinates a Java VM, JNI references, managed peers, and type conversion services.
public class JniRuntime : IDisposable
type JniRuntime = class
interface IDisposable
- Inheritance
-
JniRuntime
- 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(JniRuntime+CreationOptions) |
Initializes and registers a managed runtime for a Java VM. |
Properties
| Name | Description |
|---|---|
| CurrentRuntime |
Gets the selected managed Java runtime. |
| GlobalReferenceCount |
Gets the global-reference count reported by the object reference manager. |
| InvocationPointer |
Gets this runtime's Java VM invocation pointer. |
| JniVersion |
Gets the JNI version selected when the runtime was created. |
| MarshalMemberBuilder |
Obsolete.
Gets the unsupported legacy marshal member builder. |
| ObjectReferenceManager |
Gets the service that creates, deletes, and tracks JNI references. |
| TypeManager |
Gets the service that maps managed and JNI types. |
| ValueManager |
Gets the service that manages peers and converts managed and Java values. |
| WeakGlobalReferenceCount |
Gets the weak-global-reference count reported by the object reference manager. |
Methods
| Name | Description |
|---|---|
| AttachCurrentThread(String, JniObjectReference) |
Attaches the current thread to the Java VM and sets its JNI environment. |
| DestroyRuntime() |
Calls the Java VM's destruction function. |
| Dispose() |
Releases runtime services, unregisters this runtime, and suppresses finalization. |
| Dispose(Boolean) |
Unregisters the runtime and releases resources for the requested disposal mode. |
| ExceptionShouldTransitionToJni(Exception) |
Determines whether an exception should be passed to JNI. |
| FailFast(String) |
Attempts to terminate the process through a reflected |
| Finalize() |
Unregisters the runtime through finalizer-mode disposal. |
| GetAvailableInvocationPointers() |
Obsolete.
An unsupported API for enumerating Java VM pointers. |
| GetCurrentManagedThreadName() |
Gets an implementation-supplied name for the current managed thread. |
| GetCurrentManagedThreadStackTrace(Int32, Boolean) |
Gets an implementation-supplied stack trace for the current managed thread. |
| GetExceptionForThrowable(JniObjectReference, JniObjectReferenceOptions) |
Converts a Java throwable reference to a managed exception through the value manager. |
| GetRegisteredRuntime(IntPtr) |
Finds the managed runtime registered for a Java VM pointer. |
| GetRegisteredRuntimes() |
Gets the runtimes currently in the registration table. |
| OnEnterMarshalMethod() |
Performs runtime work before a managed JNI callback begins. |
| OnUserUnhandledException(JniTransition, Exception) |
Handles an exception thrown by a managed JNI callback. |
| RaisePendingException(Exception) |
Raises a managed exception as a pending Java exception. |
| SetCurrent(JniRuntime) |
Registers a runtime by its Java VM pointer and selects it as the current runtime. |
| ToString() |
Returns a diagnostic description of this runtime. |