title: In Scala, how to use reflection to get the real type of varargs parameters for method
body: <p>I'm using reflection to get parameter type of method, but there is some problem with varargs. Here is my code:</p>
  
  <pre><code>import reflect.runtime.universe._
  
  case class C() {
    def f(x: String*) = x
  }
  
  object Main {
    def main(args: Array[String]): Unit = {
      val c = C()
      val r = runtimeMirror(getClass.getClassLoader).reflect(c)
      val x = r.symbol.typeSignature.member(newTermName("f"))
      val params = x.asMethod.paramss.head.map {
        _.typeSignature.typeSymbol
      }
      for (param &lt;- params) {
        println(param)
      }
    }
  }
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>&gt; class &lt;repeated&gt;
  </code></pre>
  
  <p>How can I get the real type <code>String</code>? Or is there any way else to do this?</p>