title: How to get type parameter values using java reflection?
body: <pre><code>interface Foo&lt;T&gt; { ... }
  class Bar implements Foo&lt;Baz&gt; { ... }
  </code></pre>
  
  <p>I've got a <code>Bar</code> object. How to get the value of <code>T</code> for it (<code>Baz</code>)?</p>
  
  <p>So far, I only managed to get the interface and <code>T</code>, but I can't see a way to get its value.</p>
  
  <p>Thanks in advance.</p>