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

Method from_jobject

rust/src/api/instance.rs:61–69  ·  view source on GitHub ↗
(obj: jobject)

Source from the content-addressed store, hash-verified

59 }
60
61 pub fn from_jobject(obj: jobject) -> errors::Result<Instance> {
62 let _jvm = cache::get_thread_local_env().map_err(|_| Jvm::attach_thread());
63
64 Ok(Instance {
65 jinstance: obj,
66 class_name: cache::UNKNOWN_FOR_RUST.to_string(),
67 skip_deleting_jobject: false,
68 })
69 }
70
71 pub fn from_jobject_with_global_ref(obj: jobject) -> errors::Result<Instance> {
72 let _jvm = cache::get_thread_local_env().map_err(|_| Jvm::attach_thread());

Callers

nothing calls this directly

Calls 2

get_thread_local_envFunction · 0.85
to_stringMethod · 0.80

Tested by

no test coverage detected