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

Function i16_from_jobject

rust/src/jni_utils.rs:345–358  ·  view source on GitHub ↗
(obj: jobject, jni_env: *mut JNIEnv)

Source from the content-addressed store, hash-verified

343}
344
345pub(crate) unsafe fn i16_from_jobject(obj: jobject, jni_env: *mut JNIEnv) -> errors::Result<i16> {
346 if obj.is_null() {
347 Err(errors::J4RsError::JniError(
348 "Attempt to create an i16 from null".to_string(),
349 ))
350 } else {
351 let v = (opt_to_res(cache::get_jni_call_short_method())?)(
352 jni_env,
353 obj,
354 cache::get_short_to_short_method()?,
355 );
356 Ok(v as i16)
357 }
358}
359
360pub(crate) unsafe fn u16_from_jobject(obj: jobject, jni_env: *mut JNIEnv) -> errors::Result<u16> {
361 if obj.is_null() {

Callers

nothing calls this directly

Calls 4

opt_to_resFunction · 0.85
to_stringMethod · 0.80

Tested by

no test coverage detected