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

Function get_init_callback_channel_method

rust/src/cache.rs:1258–1283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1256}
1257
1258pub(crate) unsafe fn get_init_callback_channel_method() -> errors::Result<jmethodID> {
1259 get_cached!(
1260 INIT_CALLBACK_CHANNEL_METHOD,
1261 {
1262 let env = get_thread_local_env()?;
1263
1264 let init_callback_channel_method_signature = "(J)V";
1265 let cstr1 = utils::to_c_string("initializeCallbackChannel");
1266 let cstr2 = utils::to_c_string(init_callback_channel_method_signature);
1267 // Get the method ID for the `Instance.initializeCallbackChannel`
1268 let j = unsafe {
1269 (opt_to_res(get_jni_get_method_id())?)(
1270 env,
1271 get_java_instance_class()?,
1272 cstr1,
1273 cstr2,
1274 )
1275 };
1276 utils::drop_c_string(cstr1);
1277 utils::drop_c_string(cstr2);
1278
1279 j
1280 },
1281 set_init_callback_channel_method
1282 )
1283}
1284
1285pub(crate) fn set_field_method(j: jmethodID) {
1286 debug("Called set_field_method");

Callers 1

init_callback_channelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected