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

Function get_factory_create_java_map_method

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

Source from the content-addressed store, hash-verified

1051}
1052
1053pub(crate) unsafe fn get_factory_create_java_map_method() -> errors::Result<jmethodID> {
1054 get_cached!(
1055 FACTORY_CREATE_JAVA_MAP_METHOD,
1056 {
1057 let env = get_thread_local_env()?;
1058
1059 let create_java_map_method_signature = format!(
1060 "(Ljava/lang/String;Ljava/lang/String;[Lorg/astonbitecode/j4rs/api/dtos/InvocationArg;)L{};",
1061 INVO_IFACE_NAME);
1062 let cstr1 = utils::to_c_string("createJavaMap");
1063 let cstr2 = utils::to_c_string(&create_java_map_method_signature);
1064 let j = unsafe {
1065 (opt_to_res(get_jni_get_static_method_id())?)(
1066 env,
1067 get_factory_class()?,
1068 cstr1,
1069 cstr2,
1070 )
1071 };
1072 utils::drop_c_string(cstr1);
1073 utils::drop_c_string(cstr2);
1074
1075 j
1076 },
1077 set_factory_create_java_map_method
1078 )
1079}
1080
1081pub(crate) fn set_java_instance_class(j: jclass) {
1082 debug("Called set_java_instance_class");

Callers 1

do_create_java_mapMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected