Is this what you needed?
abstract class Top {
var a = "a"
var b = 3
var c = "c"
implicit def js2WJ(js: String): TopBuilder = TopBuilder(js, b, c, this)
}
case class TopBuilder(a: String, b: Int, c: String, top: Top) {
def ==> (j: Int) = copy(b = j)
def | (s: String) = copy(c = s) toTop
def toTop {
top.a = a
top.b = b
top.c = c
}
}
object B extends Top {
"B" ==> 44 | "foo"
}