r##"#[unsafe(no_mangle)]
pub extern "C" fn Java_org_example_Boo_do_1get_1foo_1arr(
env: *mut JNIEnv,
_: jclass,
this: jlong,
) -> internal_aliases::JForeignObjectsArray<Foo> {
let this: &Boo = unsafe { jlong_to_pointer::<Boo>(this).as_mut().unwrap() };
let mut ret: Vec<Foo> = Boo::get_foo_arr(this);
let mut ret: internal_aliases::JForeignObjectsArray<Foo> =
vec_of_objects_to_jobject_array(env, ret);
ret
}"##;
r##"#[unsafe(no_mangle)]
pub extern "C" fn Java_org_example_Boo_do_1get_1one_1foo(
env: *mut JNIEnv,
_: jclass,
this: jlong,
) -> jlong {
let this: &Boo = unsafe { jlong_to_pointer::<Boo>(this).as_mut().unwrap() };
let mut ret: Result<Foo, String> = Boo::get_one_foo(this);
let mut ret: jlong = match ret {
Ok(x) => {
let ret: jlong = <Foo>::box_object(x);
ret
}
Err(msg) => {
jni_throw_exception(env, &msg);
return <jlong>::jni_invalid_value();
}
};
ret
}"##;
r##"#[unsafe(no_mangle)]
pub extern "C" fn Java_org_example_Boo_r_1test_1u8(
env: *mut JNIEnv,
_: jclass,
v: jshort,
) -> jshort {
let mut v: u8 =
<u8 as ::std::convert::TryFrom<jshort>>::try_from(v).expect("invalid jshort, in jshort => u8 conversion");
let mut ret: Result<u8, &str> = r_test_u8(v);
let mut ret: jshort = match ret {
Ok(x) => {
let mut ret: jshort = jshort::from(x);
ret
}
Err(msg) => {
jni_throw_exception(env, msg);
return <jshort>::jni_invalid_value();
}
};
ret
}"##;
r##"#[unsafe(no_mangle)]
pub extern "C" fn Java_org_example_Boo_do_1now(env: *mut JNIEnv, _: jclass) -> jlong {
let mut ret: SystemTime = now();
let since_unix_epoch = ret
.duration_since(::std::time::UNIX_EPOCH)
.expect("SystemTime to Unix time conv. error");
let mut ret: jlong = <i64 as ::std::convert::TryFrom<u64>>::try_from(
since_unix_epoch.as_secs() * 1_000 + u64::from(since_unix_epoch.subsec_millis()),
)
.expect("SystemTime: milleseconds u64 to i64 convert error");
ret
}"##;