MCPcopy Create free account
hub / github.com/astonbitecode/j4rs / find_class

Function find_class

rust/src/api_tweaks/no_runtime_lib_loading.rs:39–47  ·  view source on GitHub ↗
(env: *mut JNIEnv, classname: &str)

Source from the content-addressed store, hash-verified

37}
38
39pub(crate) fn find_class(env: *mut JNIEnv, classname: &str) -> errors::Result<jclass> {
40 unsafe {
41 let cstr = utils::to_c_string(classname);
42 let fc = (**env).v1_6.FindClass;
43 let jc = (fc)(env, cstr);
44 utils::drop_c_string(cstr);
45 Ok(jc)
46 }
47}

Callers

nothing calls this directly

Calls 2

to_c_stringFunction · 0.85
drop_c_stringFunction · 0.85

Tested by

no test coverage detected