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

Function get_factory_create_java_list_method

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

Source from the content-addressed store, hash-verified

1015}
1016
1017pub(crate) unsafe fn get_factory_create_java_list_method() -> errors::Result<jmethodID> {
1018 get_cached!(
1019 FACTORY_CREATE_JAVA_LIST_METHOD,
1020 {
1021 let env = get_thread_local_env()?;
1022
1023 let create_java_list_method_signature = format!(
1024 "(Ljava/lang/String;[Lorg/astonbitecode/j4rs/api/dtos/InvocationArg;)L{};",
1025 INVO_IFACE_NAME
1026 );
1027 let cstr1 = utils::to_c_string("createJavaList");
1028 let cstr2 = utils::to_c_string(&create_java_list_method_signature);
1029 let j = unsafe {
1030 (opt_to_res(get_jni_get_static_method_id())?)(
1031 env,
1032 get_factory_class()?,
1033 cstr1,
1034 cstr2,
1035 )
1036 };
1037 utils::drop_c_string(cstr1);
1038 utils::drop_c_string(cstr2);
1039
1040 j
1041 },
1042 set_factory_create_java_list_method
1043 )
1044}
1045
1046pub(crate) fn set_factory_create_java_map_method(j: jmethodID) {
1047 debug("Called set_factory_create_java_map_method");

Callers 1

do_create_java_listMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected