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

Function get_factory_create_for_static_method

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

Source from the content-addressed store, hash-verified

945}
946
947pub(crate) unsafe fn get_factory_create_for_static_method() -> errors::Result<jmethodID> {
948 get_cached!(
949 FACTORY_CREATE_FOR_STATIC_METHOD,
950 {
951 let env = get_thread_local_env()?;
952 let create_for_static_method_signature =
953 format!("(Ljava/lang/String;)L{};", INVO_IFACE_NAME);
954
955 let cstr1 = utils::to_c_string("createForStatic");
956 let cstr2 = utils::to_c_string(&create_for_static_method_signature);
957 let j = unsafe {
958 (opt_to_res(get_jni_get_static_method_id())?)(
959 env,
960 get_factory_class()?,
961 cstr1,
962 cstr2,
963 )
964 };
965 utils::drop_c_string(cstr1);
966 utils::drop_c_string(cstr2);
967
968 j
969 },
970 set_factory_create_for_static_method
971 )
972}
973
974pub(crate) fn set_factory_create_java_array_method(j: jmethodID) {
975 debug("Called set_factory_create_java_array_method");

Callers 2

static_classMethod · 0.85
invoke_staticMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected