I would like to reduce the level of implementation information from leaking into my public Scala APIs, and there are so many buttons for setting visibility that my head spins from trying to figure out:
What is the best way to protect implementation level classes, features, and objects from the public Scala APIs?
The best I can think of is to do:
package restaurant {
trait Service {
acceptOrder(dish: String, quantity: Int)
}
package impl {
private class ServiceImpl {
acceptOrder(dish: String, quantity: Int) = println("order accepted")
}
private class ServiceHelper {
def helpDoStuff() = ???
}
}
}
, impl 'private',
( ) . , Scala > < , , , . , , .
, ... , , .
: Scala. API. , , , .
IDEA:
, , , IDEA . - . Intellij ( - : https://youtrack.jetbrains.com/issue/IDEA-144872)