This is related to the following question, but since it concerns a distinct and salient issue, I'm asking it as a follow up: Support generic deserialization from a List[(String, Any)] in Scala
How can I use reflection to find the methods of the companion object for a ClassTag
? Specifically, I'm trying to call the apply
method of a case class' companion object reflectively to construct an instance of a case class.
Could this answer help you?
Here is an example for
scalaVersion := "2.11.1"
prints