title: How do I get the runtime Class of a parameterized Type in a Scala trait
body: <p>I'm trying to implement a Scala trait that handles the details of interfacing with a Java library that requires us to create </p>
  
  <p>What I want to do is something like:</p>
  
  <pre><code>trait SomeTrait[A] extends JavaAPI {
    def foo = {
      callApi(classOf[A])
    }
  
    override def bar = {
      foo
    }
  }
  </code></pre>
  
  <p>Note that bar is actually overriding a method from a base class, so I can't change it's signature.</p>
  
  <p>I've tried several variations with Manifests, etc., but can't quite get this to work. Is there a way to get the runtime class of a parameterized type?</p>