without package private visibility, what are my op...
# announcements
r
without package private visibility, what are my options to restrict use of a class to the same package (i.e. spring has a way to map exceptions to http status codes via annotations, I want to make sure that these are only used from the controllers)
g
https://youtrack.jetbrains.com/issue/KT-29227 You can't really reduce the visibility, unless you put everything in one file. Or, you can use a similar trick that Swift guys are doing (they also don't have proper visibility scopes), and kind of wrap your class into another "namespace" class.
r
thanks, i’ll have a look at this