title: Using the new reflection API, how to find the primary constructor of a class?
body: <p>You can get all the constructors of a class like this:</p>
  
  <pre><code>import scala.reflect.runtime.universe._
  
  val ctor = typeOf[SomeClass].declaration(nme.CONSTRUCTOR).asTerm.alternatives
  </code></pre>
  
  <p>Is there a way to know which one is the primary constructor? Is it always the first in the list?
  What happens in case <code>SomeClass</code> is defined in Java where the concept of <em>primary constructor</em> doesn't exist?</p>