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

Function get_factory_create_java_array_method

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

Source from the content-addressed store, hash-verified

979}
980
981pub(crate) unsafe fn get_factory_create_java_array_method() -> errors::Result<jmethodID> {
982 get_cached!(
983 FACTORY_CREATE_JAVA_ARRAY_METHOD,
984 {
985 let env = get_thread_local_env()?;
986
987 let create_java_array_method_signature = format!(
988 "(Ljava/lang/String;[Lorg/astonbitecode/j4rs/api/dtos/InvocationArg;)L{};",
989 INVO_IFACE_NAME
990 );
991 let cstr1 = utils::to_c_string("createJavaArray");
992 let cstr2 = utils::to_c_string(&create_java_array_method_signature);
993 let j = unsafe {
994 (opt_to_res(get_jni_get_static_method_id())?)(
995 env,
996 get_factory_class()?,
997 cstr1,
998 cstr2,
999 )
1000 };
1001 utils::drop_c_string(cstr1);
1002 utils::drop_c_string(cstr2);
1003
1004 j
1005 },
1006 set_factory_create_java_array_method
1007 )
1008}
1009
1010pub(crate) fn set_factory_create_java_list_method(j: jmethodID) {
1011 debug("Called set_factory_create_java_list_method");

Callers 1

create_java_arrayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected