Expand description
Common glue code between Rust and JNI, used in autogenerated java-spaghetti
glue code.
See also the Android JNI tips documentation as well as the Java Native Interface Specification.
Re-exports§
pub use ::jni_sys as sys;
Structs§
- Arg
- FFI: Use Arg<java::lang::Object> instead of jobject. This represents a (null?) function argument.
- Boolean
Array - A PrimitiveArray implementation.
- Byte
Array - A PrimitiveArray implementation.
- Cast
Error - Error returned on failed
.cast()
.` - Char
Array - A PrimitiveArray implementation.
- Double
Array - A PrimitiveArray implementation.
- Env
- FFI: Use Env instead of *const JNIEnv. This represents a per-thread Java exection environment.
- Float
Array - A PrimitiveArray implementation.
- Global
- A Global, non-null, reference to a Java object (+ VM).
- IntArray
- A PrimitiveArray implementation.
- Local
- A Local, non-null, reference to a Java object (+ Env) limited to the current thread/stack.
- Long
Array - A PrimitiveArray implementation.
- Null
- Object
Array - A Java Array of reference types (classes, interfaces, other arrays, etc.)
- Object
Array Iter - Ref
- A non-null, reference to a Java object (+ Env). This may refer to a Local, Global, local Arg, etc.
- Return
- FFI: Use Return<java::lang::Object> instead of jobject. This represents a (null?) JNI function call return value.
- Short
Array - A PrimitiveArray implementation.
- String
Chars - Represents an env.GetStringChars + env.GetStringLength query. Will automatically env.ReleaseStringChars when dropped.
- VM
- FFI: Use &VM instead of *const JavaVM. This represents a global, process-wide Java exection environment.
Traits§
- AsArg
- Assignable
To - Marker trait indicating
Self
can be assigned toT
. - JniType
- JNI bindings rely on this type being accurate.
- Primitive
Array - A Java Array of some POD-like type such as bool, jbyte, jchar, jshort, jint, jlong, jfloat, or jdouble.
- Throwable
Type - A marker type indicating this is a valid exception type that all exceptions thrown by java should be compatible with