Expand description
Wrappers for object pointers returned from the JVM.
Structs§
- Auto
Array - Auto-release wrapper for pointer-based generic arrays.
- Auto
Local - Auto-delete wrapper for local refs.
- Auto
Primitive Array - Auto-release wrapper for pointer-based primitive arrays.
- Global
Ref - 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. - JByte
Buffer - Lifetime’d representation of a
jobject
that is an instance of the ByteBuffer Java class. Just aJObject
wrapped in a new class. - JClass
- Lifetime’d representation of a
jclass
. Just aJObject
wrapped in a new class. - JFieldID
- 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 ajfieldid
. - JList
- Wrapper for JObjects that implement
java/util/List
. Provides methods to get, add, and remove elements. - JList
Iter - An iterator over the keys and values in a map.
- JMap
- Wrapper for JObjects that implement
java/util/Map
. Provides methods to get and set entries and a way to iterate over key/value pairs. - JMap
Iter - An iterator over the keys and values in a map.
- JMethodID
- 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 ajmethodid
. - JObject
- 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 ajobject
. - JStatic
FieldID - 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 ajstaticfieldid
. - JStatic
MethodID - 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 ajmethodid
. This represents static methods only since they require a different set of JNI signatures. - JString
- Lifetime’d representation of a
jstring
. Just aJObject
wrapped in a new class. - JThrowable
- Lifetime’d representation of a
jthrowable
. Just aJObject
wrapped in a new class.
Enums§
- JValue
- Rusty version of the JNI C
jvalue
enum. Used in Java method call arguments and returns. - Release
Mode - ReleaseMode
Traits§
- Type
Array - Trait to define type array access/release