title: Scala type casting
body: <p>In Scala, given an Object </p>
  
  <pre><code>scala&gt; f.get(c)
  res1: Object = 1
  </code></pre>
  
  <p>and</p>
  
  <pre><code>scala&gt; f.getType
  res3: Class[_] = int
  </code></pre>
  
  <p>how to get </p>
  
  <pre><code>val a = 1
  </code></pre>
  
  <p>where a is of type Int, and where the type is known only from f.getType.</p>