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

Function parent_interface_method

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

Source from the content-addressed store, hash-verified

1001
1002 #[test]
1003 fn parent_interface_method() -> errors::Result<()> {
1004 let jvm = create_tests_jvm()?;
1005 let instance = jvm
1006 .create_instance("org.astonbitecode.j4rs.tests.MyTest", InvocationArg::empty())
1007 ?;
1008
1009 let size: isize = jvm
1010 .into_chain(instance)
1011 .invoke("getMap", InvocationArg::empty())
1012 ?
1013 .cast("java.util.Map")
1014 ?
1015 .invoke("size", InvocationArg::empty())
1016 ?
1017 .to_rust()
1018 ?;
1019
1020 assert!(size == 2);
1021
1022 Ok(())
1023 }
1024
1025 #[test]
1026 fn invoke_generic_method() -> errors::Result<()> {

Callers

nothing calls this directly

Calls 6

create_tests_jvmFunction · 0.85
create_instanceMethod · 0.80
into_chainMethod · 0.80
invokeMethod · 0.65
castMethod · 0.65
to_rustMethod · 0.45

Tested by

no test coverage detected