title: How to get concrete type of a generic interface
body: <p>I have an interface</p>
  
  <pre><code>public interface FooBar&lt;T&gt; { }
  </code></pre>
  
  <p>I have a class that implements it</p>
  
  <p><code>public class BarFoo implements FooBar&lt;Person&gt; { }</code></p>
  
  <p>With reflection, I want to take an instance of BarFoo and get that the version of FooBar it implements is Person.</p>
  
  <p>I use <code>.getInterfaces</code> from BarFoo to get back to FooBar, but that doesn't help me find out what T is.</p>