title: Call a "static" method belonging to a generic type in scala
body: <p>Is there a way in scala to call a method belonging to a type? For example, suppose I have a trait called <code>Constructable</code> that describes types than can construct a default instance of themselves. Then, I can write the following code:</p>
  
  <pre><code>  trait Constructable[A] {
      def construct: A
    }
  
    class Foo(x: Int) extends Constructable[Foo] {
      def construct = new Foo(0)
    }
  
    def main(args: Array[String]) {
      val f = new Foo(4)
      println(f.construct)
    }
  </code></pre>
  
  <p>This is ok, but what I really want is to be able to construct a default object given only the type of object. For example, suppose I want to accept a list of constructables and prepend a default object at the beginning of the list:</p>
  
  <pre><code>  def prependDefault1[A &lt;: Constructable[A]](c: List[A]): List[A] = {
      val h = c.head
      h.construct :: c
    }
  </code></pre>
  
  <p>The above code works, but only if c is not empty. What I'd really like is to write something like the following:</p>
  
  <pre><code>  def prependDefault2[A &lt;: Constructable[A]](c: List[A]): List[A] = {
      A.construct :: c
    }
  </code></pre>
  
  <p>Is there any way to achieve this, possibly by changing the definition of a <code>Constructable</code> so that the <code>construct</code> method belongs to the "class" rather than the "instance" (to use Java terminology)?</p>