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

Method as_java_ptr_with_global_ref

rust/src/api/invocation_arg.rs:202–214  ·  view source on GitHub ↗

Creates a `jobject` from this InvocationArg.

(&self, jni_env: *mut JNIEnv)

Source from the content-addressed store, hash-verified

200
201 /// Creates a `jobject` from this InvocationArg.
202 pub fn as_java_ptr_with_global_ref(&self, jni_env: *mut JNIEnv) -> errors::Result<jobject> {
203 match self {
204 _s @ &InvocationArg::Java { .. } => {
205 jni_utils::invocation_arg_jobject_from_java(self, jni_env, true)
206 }
207 _s @ &InvocationArg::Rust { .. } => {
208 jni_utils::invocation_arg_jobject_from_rust_serialized(self, jni_env, true)
209 }
210 _s @ &InvocationArg::RustBasic { .. } => {
211 jni_utils::invocation_arg_jobject_from_rust_basic(self, jni_env, true)
212 }
213 }
214 }
215
216 /// Creates a `jobject` from this InvocationArg. The jobject contains a local reference.
217 pub fn as_java_ptr_with_local_ref(&self, jni_env: *mut JNIEnv) -> errors::Result<jobject> {

Callers 9

handle_channel_senderMethod · 0.80
create_instanceMethod · 0.80
create_java_arrayMethod · 0.80
do_create_java_listMethod · 0.80
do_create_java_mapMethod · 0.80
invokeMethod · 0.80
invoke_to_channelMethod · 0.80
invoke_staticMethod · 0.80
check_equalsMethod · 0.80

Tested by

no test coverage detected