Eugene Burmako | 1 Aug 2012 10:56
Picon
Gravatar

Invoking a constructor through reflection in scala 2.10

What's the best practice for invoking a constructor of a class in
scala 2.10 (M4+) ?

For example, this is the constructor methodSymbol:
val constructor =
reflect.runtime.universe.typeOf[scala.List[_]].members.find
(_.toString contains "constructor").get.asMethodSymbol


Gmane