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

Function get_get_object_class_name_method

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

Source from the content-addressed store, hash-verified

1466}
1467
1468pub(crate) unsafe fn get_get_object_class_name_method() -> errors::Result<jmethodID> {
1469 get_cached!(
1470 GET_OBJECT_CLASS_NAME_METHOD,
1471 {
1472 let env = get_thread_local_env()?;
1473
1474 let get_object_class_name_method_signature = "()Ljava/lang/String;";
1475 let cstr1 = utils::to_c_string("getObjectClassName");
1476 let cstr2 = utils::to_c_string(get_object_class_name_method_signature);
1477
1478 // Get the method ID for the `Instance.getObjectClass`
1479 let j = unsafe {
1480 (opt_to_res(get_jni_get_method_id())?)(
1481 env,
1482 get_java_instance_class()?,
1483 cstr1,
1484 cstr2,
1485 )
1486 };
1487 utils::drop_c_string(cstr1);
1488 utils::drop_c_string(cstr2);
1489
1490 j
1491 },
1492 set_get_object_class_name_method
1493 )
1494}
1495
1496pub(crate) fn set_get_object_method(j: jmethodID) {
1497 debug("Called set_get_object_method");

Callers 1

to_rust_boxedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected