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

Function cast

rust/src/lib.rs:536–545  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

534
535 #[test]
536 fn cast() -> errors::Result<()> {
537 let jvm = create_tests_jvm()?;
538
539 let instantiation_args = vec![InvocationArg::try_from("Hi")?];
540 let instance = jvm
541 .create_instance("java.lang.String", instantiation_args.as_ref())?;
542 jvm.cast(&instance, "java.lang.Object")?;
543
544 Ok(())
545 }
546
547 #[test]
548 fn invoke_vec() -> errors::Result<()> {

Callers

nothing calls this directly

Calls 3

create_tests_jvmFunction · 0.85
create_instanceMethod · 0.80
castMethod · 0.65

Tested by

no test coverage detected