Reputation: 167
Say I have bunch of Scala classes and I want to compile and package it to JAR.
I want to expose only some limited number of classes to external user of the JAR and "hide" any other classes.
The question: How can I achieve that without explicitly specifying private access modifier for classes to hide?
The problem is that in Scala class is public by default.
The ideal solution would be some Scala compiler option that changes default class modifier to private.
Upvotes: 0
Views: 166
Reputation: 4260
I think you answered your own question. Scala provides private
for exactly this usecase.
Upvotes: 1