title: Scala: How to get attribute names of a case class
body: <p>I am new to Scala and I have a case class  "Lr". I need to print all the attribute names as header delimited by tab like:</p>
  
  <pre><code>some1_ID    some2_ID
  </code></pre>
  
  <p>But I am getting ans:</p>
  
  <pre><code>value some1_ID  value some2_ID
  </code></pre>
  
  <p>May I get help on how to modify my code to get the right ans?</p>
  
  <pre><code>package com.......
  
  case class Lr (
    some1_ID : Option[String],
    some2_ID : Option[String]
  )
  
  object EchoLr {
  
    def classAccessors[T: TypeTag]: String = typeOf[T].members.collect { 
      case m: MethodSymbol if m.isCaseAccessor =&gt; m
    }.mkString("\t")
  
    def main( args:Array[String] ):Unit = {
      val testLR = Lr(Option("something1"),Option("something2"))
      println(classAccessors[Lr])
    }
  }
  </code></pre>
  
  <p>I was following :</p>
  
  <p><a href="https://stackoverflow.com/questions/31189754/get-field-names-list-from-case-class">Get field names list from case class</a></p>