Creates a `jobject` from this InvocationArg.
(&self, jni_env: *mut JNIEnv)
| 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> { |
no test coverage detected