vendredi 27 mai 2016

Extract scala case class field

Given the following class:
case class Test(id: Long, name: String) { val details = Map("size" -> 54) }

How do i extract details without instantiating the class? I Know how to extract the id and the name using Scala reflection but can't figure out how to extract what i need.





Aucun commentaire:

Enregistrer un commentaire