Code:
sealed class S {
companion object {
operator fun invoke(condition: Boolean): S {
return if(condition) A() else B()
}
}
}
private class A : S()
private class B : S()
Problem:
Android library Fragments requires classes to be public static, but actually generated java classes A and B are not like that. Is it possible to specify required visiblity for them?