Closed sidneywang closed 5 years ago
I want to call write_file in Java class, but Extra can't be created because of private field imported in Extra. So, I added a new function to create Extra instance.
java::Java::write_file(class.into_tokens(), &mut formatter, &mut extra, 1)?;
You can create an Extra instance using its Default impl:
Extra
Default
let mut extra = Extra::default();
OK, it works, even though I need two steps to create an instance.
I want to call write_file in Java class, but Extra can't be created because of private field imported in Extra. So, I added a new function to create Extra instance.