Trait HierExt

Source
pub trait HierExt<'local> {
    // Required methods
    fn get_java_version(&mut self) -> Result<JavaVersion>;
    fn class_name<'other_local, T>(&mut self, class: T) -> Result<String>
       where T: Desc<'local, JClass<'other_local>>;
}
Expand description

The additional definition for JNIEnv, used for define JClass caching (see [HierExt::lookup_class] and [HierExt::free_lookup]) and other useful class-related functions.

Required Methods§

Source

fn get_java_version(&mut self) -> Result<JavaVersion>

Gets the java version currently the jni environment is running on.

Source

fn class_name<'other_local, T>(&mut self, class: T) -> Result<String>
where T: Desc<'local, JClass<'other_local>>,

Returns the given class’ class path.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'local> HierExt<'local> for JNIEnv<'local>

Source§

fn get_java_version(&mut self) -> Result<JavaVersion>

Source§

fn class_name<'other_local, T>(&mut self, class: T) -> Result<String>
where T: Desc<'local, JClass<'other_local>>,

Implementors§