Crate java_oxide

Crate java_oxide 

Source
Expand description

Common glue code between Rust and JNI, used in auto-generated java-oxide glue code.

See also the Android JNI tips documentation as well as the Java Native Interface Specification.

Just like jni-rs, thread safety of accessing Java objects are not guaranteed, unless they are thread-safe by themselves.

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.
CastError
Error returned on failed .cast().`
Env
FFI: Use Env instead of *const JNIEnv. This represents a per-thread Java exection environment.
Global
A Global, non-null, reference to a Java object (+ VM).
Local
A Local, non-null, reference to a Java object (+ Env) limited to the current thread/stack.
Monitor
A borrowed Ref of a Java object locked with the JNI monitor mechanism, providing limited thread safety.
Null
Represents a Java null value.
ObjectArray
A Java Array of reference types (classes, interfaces, other arrays, etc.)
ObjectArrayIter
An iterator over object items of an ObjectArray. Local references of object items will be created automatically.
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.
StringChars
Represents a JNI GetStringChars + GetStringLength query. It will call ReleaseStringChars automatically when dropped.
VM
FFI: Use &VM instead of *const JavaVM. This represents a global, process-wide Java exection environment.

Enums§

BooleanArray
A PrimitiveArray implementation.
ByteArray
A PrimitiveArray implementation.
CharArray
A PrimitiveArray implementation.
DoubleArray
A PrimitiveArray implementation.
FloatArray
A PrimitiveArray implementation.
IntArray
A PrimitiveArray implementation.
LongArray
A PrimitiveArray implementation.
ShortArray
A PrimitiveArray implementation.

Traits§

AsArg
A marker trait indicating this is a valid JNI reference type for Java method argument type T, this can be null.
AssignableTo
Marker trait indicating Self can be assigned to T.
JavaDebug
A trait similar to Debug. Currently it is implemented by Throwable in generated bindings.
JavaDisplay
A trait similar to Display.
JniType
JNI bindings rely on this type being accurate.
PrimitiveArray
A Java Array of some POD-like type such as bool, jbyte, jchar, jshort, jint, jlong, jfloat, or jdouble.
ThrowableType
A marker type indicating this is a valid exception type that all exceptions thrown by java should be compatible with