()
| 1536 | } |
| 1537 | |
| 1538 | pub(crate) unsafe fn get_inv_arg_java_constructor_method() -> errors::Result<jmethodID> { |
| 1539 | get_cached!( |
| 1540 | INV_ARG_JAVA_CONSTRUCTOR_METHOD, |
| 1541 | { |
| 1542 | let env = get_thread_local_env()?; |
| 1543 | |
| 1544 | let inv_arg_java_constructor_method_signature = |
| 1545 | format!("(Ljava/lang/String;L{};)V", INVO_IFACE_NAME); |
| 1546 | let cstr1 = utils::to_c_string("<init>"); |
| 1547 | let cstr2 = utils::to_c_string(&inv_arg_java_constructor_method_signature); |
| 1548 | let j = unsafe { |
| 1549 | (opt_to_res(get_jni_get_method_id())?)( |
| 1550 | env, |
| 1551 | get_invocation_arg_class()?, |
| 1552 | cstr1, |
| 1553 | cstr2, |
| 1554 | ) |
| 1555 | }; |
| 1556 | utils::drop_c_string(cstr1); |
| 1557 | utils::drop_c_string(cstr2); |
| 1558 | |
| 1559 | j |
| 1560 | }, |
| 1561 | set_inv_arg_java_constructor_method |
| 1562 | ) |
| 1563 | } |
| 1564 | |
| 1565 | pub(crate) fn set_inv_arg_rust_constructor_method(j: jmethodID) { |
| 1566 | debug("Called set_inv_arg_rust_constructor_method"); |
no outgoing calls
no test coverage detected