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

Function find_class

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

Source from the content-addressed store, hash-verified

72}
73
74pub(crate) fn find_class(env: *mut JNIEnv, classname: &str) -> errors::Result<jclass> {
75 unsafe {
76 let cstr = utils::to_c_string(classname);
77 let fc = (**env).v1_6.FindClass;
78 let jc = (fc)(env, cstr);
79 utils::drop_c_string(cstr);
80 Ok(jc)
81 }
82}

Callers

nothing calls this directly

Calls 2

to_c_stringFunction · 0.85
drop_c_stringFunction · 0.85

Tested by

no test coverage detected