title: How do I build a Java type object at runtime from a generic type definition and runtime type parameters?
body: <p>Assuming a generic type declaration (Java)</p>
  
  <pre><code>class Foo&lt;T&gt; {
      public T bar;
  }
  </code></pre>
  
  <p>how can I, at runtime, instantiate a Type object that represents Foo parameterized over a specific type T (also known only at runtime)?</p>