I’ve got some Scala classes and objects, in their own packages. Each package has a package object defining some implicits, so for example import com.foo.bar._ imports all implicits and classes from the bar package
What I’d like to know is, is there a way to define an “umbrella” import, say com.foo.all, such that
import com.foo.all._
is equivalent to
import com.foo.bar._
import com.foo.baz._
import com.foo.qux._
...
I can understand that this might be a little unclear, but if I we consider the case where I have a large number of my own packages, this would clearly be more concise.
The shortest form I can come up is:
For example:
EDIT
Perhaps, you want to use only some particular things, as @alex23 pointed out, so you may write: