casualjim
1/3/2012 - 7:51 PM

gistfile1.txt

scala> class Blah extends DelayedInit {
     | def delayedInit(init: => Unit) {
     | println("before init")
     | init
     | println("after init")
     | }
     | println("init")
     | }
defined class Blah

scala> new Blah
before init
init
after init
res0: Blah = Blah@11ace672