title: Get field names list from case class
body: <p>I need to get only field names of case class. I'm not interested in its values.
  I thought <code>getClass.getDeclaredFields.map(_.getName)</code> would return a list of field names.</p>
  
  <pre><code>scala&gt; case class User(id: Int, name: String)
  defined class User
  
  scala&gt; User.getClass.getDeclaredFields
  res14: Array[java.lang.reflect.Field] = Array(public static final User$ User$.MODULE$)
  
  scala&gt; User.getClass.getDeclaredFields.toList
  res15: List[java.lang.reflect.Field] = List(public static final User$ User$.MODULE$)
  
  scala&gt; val user = User(1, "dude")
  user: User = User(1,dude)
  
  scala&gt; user.getClass.getDeclaredFields.toList
  res16: List[java.lang.reflect.Field] = List(private final int User.id, private final java.lang.String User.name)
  </code></pre>
  
  <p>What is this User$.MODULE$? What's that?</p>
  
  <p>Method getDeclaredFields works fine when you have an instance of a case class, but I don't want to create an instance in order to get only fields.</p>
  
  <p>Why this isn't true:
  <code>User.getClass.getDeclaredFields.map(_.getName) == List("id", "name")</code>?</p>