Creates a new Java List with elements of the class `inner_class_name`.
(
&self,
inner_class_name: impl Into<&'a str>,
inv_args: Vec<impl TryInto<InvocationArg, Error = J4RsError>>,
)
| 627 | |
| 628 | /// Creates a new Java List with elements of the class `inner_class_name`. |
| 629 | pub fn java_list<'a>( |
| 630 | &self, |
| 631 | inner_class_name: impl Into<&'a str>, |
| 632 | inv_args: Vec<impl TryInto<InvocationArg, Error = J4RsError>>, |
| 633 | ) -> errors::Result<Instance> { |
| 634 | let v: Result<Vec<InvocationArg>, J4RsError> = |
| 635 | inv_args.into_iter().map(|arg| arg.try_into()).collect(); |
| 636 | Self::do_create_java_list(self.jni_env, inner_class_name.into(), v?.as_ref()) |
| 637 | } |
| 638 | |
| 639 | fn do_create_java_list( |
| 640 | jni_env: *mut JNIEnv, |