once again I have run into a situation where the lack of package-private access is a really bad thing
➕ 1
dumptruckman
04/01/2019, 4:14 PM
I have an EmailTemplate class in my email-service module. It has members that should not be part of its public API. The members only need to be accessed by a class in the same package (and module). However, they’re open because they’re intended to be overriden. Unfortunately, there is no way to now create templates in other modules.
dumptruckman
04/01/2019, 4:15 PM
To do this I now have to have an internal getter method to access a protected open val.
dumptruckman
04/01/2019, 4:15 PM
Can we just all agree that this is stupid?
🚫 6
dumptruckman
04/01/2019, 4:18 PM
this is how you get Java’s
protected
functionality back in Kotlin:
a
Artglorin
04/01/2019, 4:33 PM
Maybe the better way is not to create protected field but redesign your API and provide a well fitted EmailTemplateBuilder?