Is there an ergonomic way to make constructors fil...
# announcements
t
Is there an ergonomic way to make constructors file-visible only?
Context: I want to control the creation of several classes which represent intermediate steps in a process and I don't want users of this API able to skip steps by creating the corresponding class via constructor. Problem is that definition and usage happens in the same module, so
internal
does not work here.
s
Probably just make the constructor private then, maybe expose an appropriate factory method in the companion object