I need to get only field names of case class. I\'m not interested in its values. I thought getClass.getDeclaredFields.map(_.getName) would return a list of fiel
getClass.getDeclaredFields.map(_.getName)
Following Andrey Tyukin solution, to get only the list of fields in Scala 2.12:
val fields: List[String] = classOf[Dummy].getDeclaredFields.map(_.getName).toList