I'm developing a code generator that will output the following classes/objects:
class A {
var a : Int = _
var b : B = _
class B {
var b : Int = _
var c : C = _
class C {
var c : Int = _
}
}
}
object A {
val a = ...
object B extends Base {
val b = ...
object C extends Base {
val c = ...
}
}
}
with the user constructing the terms like this:
A (
a(1),
B (
b(2),
C (
c(3)
)
)
)
Now in order to make it work I have to insert 3 imports in the user code:
import A._
import A.B._
import A.B.C._
This looks ugly to me. May be there is another way to tackle the problem that I'm just blind to see?
Thank you in advance.