title: Why does getActualTypeArguments return Object instead of Integer for Option[Int]?
body: <p>I'm having trouble figuring out how to get the type parameter of Option when the type parameter is Int</p>
  
  <p>I tried the following code:</p>
  
  <pre><code>class TestClass {
    val intField: Option[Int] = Some(1)
  }
  
  val cls = new TestClass
  val field = cls.getDeclaredField("intField")
  val typeParams = field.getGenericType.asInstanceOf[ParameterizedType].getActualTypeArguments
  </code></pre>
  
  <p>typeParams gives me java.lang.Object</p>
  
  <p>my question is how do I get it to return java.lang.Integer to me</p>