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

Function get_get_json_method

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

Source from the content-addressed store, hash-verified

1396}
1397
1398pub(crate) unsafe fn get_get_json_method() -> errors::Result<jmethodID> {
1399 get_cached!(
1400 GET_JSON_METHOD,
1401 {
1402 let env = get_thread_local_env()?;
1403
1404 let get_json_method_signature = "()Ljava/lang/String;";
1405 let cstr1 = utils::to_c_string("getJson");
1406 let cstr2 = utils::to_c_string(get_json_method_signature);
1407
1408 // Get the method ID for the `Instance.getJson`
1409 let j = unsafe {
1410 (opt_to_res(get_jni_get_method_id())?)(
1411 env,
1412 get_java_instance_class()?,
1413 cstr1,
1414 cstr2,
1415 )
1416 };
1417 utils::drop_c_string(cstr1);
1418 utils::drop_c_string(cstr2);
1419
1420 j
1421 },
1422 set_get_json_method
1423 )
1424}
1425
1426pub(crate) fn set_check_equals_method(j: jmethodID) {
1427 debug("Called set_check_equals_method");

Callers 1

to_rust_deserializedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected