title: Scala get constructor parameters at runtime
body: <p>I'm trying to use reflection to get the types of constructor parameters of a class at runtime. The method below is in the abstract superclass. However <code>this.type</code> is not behaving as expected. Any help would be much appreciated.</p>
  
  <pre><code>  /**
     * Maps constructor field names to types
     *
     * @return Map[String, Type]
     */
    def getParamTypes: Map[String, ru.Type] =
      ru.typeOf[this.type].
        member(ru.termNames.CONSTRUCTOR)
        .asMethod.paramLists(0).
        foldRight(Map(): Map[String, ru.Type])((p, a) =&gt; {
          a + (p.name.decodedName.toString -&gt; p.typeSignature)
        })
  </code></pre>