Dear kotlin community,
Recently I started to create a simple DSL on top of apache POI.
And I came across the problem of not being able to author classes for which some members have package level visibility and others public one, as per below:
Before conversion
public class Foo {
public void foo1() {
System.out.println("foo1");
}
void foo2() {
System.out.println("foo2");
}
}
After conversion
class Foo {
fun foo1() {
println("foo1")
}
internal fun foo2() {
println("foo2")
}
}
I’ve read some kt conversations on this topic, and one of the solutions was to have all classes with the package level visibility members in the same file.
I did this but it seems that in that case I cannot mix package level and public level members in the same class.
Is there a good approach for addressing this w/o having internal visibility and another module?
Thank you in advance for your support.
Tony