Module jni::objects

source · []
Expand description

Wrappers for object pointers returned from the JVM.

Structs

Auto-release wrapper for pointer-based generic arrays.

Auto-delete wrapper for local refs.

Auto-release wrapper for pointer-based primitive arrays.

A global JVM reference. These are “pinned” by the garbage collector and are guaranteed to not get collected until released. Thus, this is allowed to outlive the JNIEnv that it came from and can be used in other threads.

Lifetime’d representation of a jobject that is an instance of the ByteBuffer Java class. Just a JObject wrapped in a new class.

Lifetime’d representation of a jclass. Just a JObject wrapped in a new class.

Wrapper around sys::jfieldid that adds a lifetime. This prevents it from outliving the context in which it was acquired and getting GC’d out from under us. It matches C’s representation of the raw pointer, so it can be used in any of the extern function argument positions that would take a jfieldid.

Wrapper for JObjects that implement java/util/List. Provides methods to get, add, and remove elements.

An iterator over the keys and values in a map.

Wrapper for JObjects that implement java/util/Map. Provides methods to get and set entries and a way to iterate over key/value pairs.

An iterator over the keys and values in a map.

Wrapper around sys::jmethodid that adds a lifetime. This prevents it from outliving the context in which it was acquired and getting GC’d out from under us. It matches C’s representation of the raw pointer, so it can be used in any of the extern function argument positions that would take a jmethodid.

Wrapper around sys::jobject that adds a lifetime. This prevents it from outliving the context in which it was acquired and getting GC’d out from under us. It matches C’s representation of the raw pointer, so it can be used in any of the extern function argument positions that would take a jobject.

Wrapper around sys::jstaticfieldid that adds a lifetime. This prevents it from outliving the context in which it was acquired and getting GC’d out from under us. It matches C’s representation of the raw pointer, so it can be used in any of the extern function argument positions that would take a jstaticfieldid.

Wrapper around sys::jmethodid that adds a lifetime. This prevents it from outliving the context in which it was acquired and getting GC’d out from under us. It matches C’s representation of the raw pointer, so it can be used in any of the extern function argument positions that would take a jmethodid. This represents static methods only since they require a different set of JNI signatures.

Lifetime’d representation of a jstring. Just a JObject wrapped in a new class.

Lifetime’d representation of a jthrowable. Just a JObject wrapped in a new class.

Enums

Rusty version of the JNI C jvalue enum. Used in Java method call arguments and returns.

ReleaseMode

Traits

Trait to define type array access/release