title: Get concrete class of interface field using Java reflection
body: <p>I have a class which has an interface as member</p>
  
  <pre><code>Class A {
      IProp property;
  }
  </code></pre>
  
  <p>At runtime we assign property with one of the concrete classes implementing <code>IProp</code>. 
  Say,</p>
  
  <pre><code>A a = new A();
  a.property = new IPropImpl();
  </code></pre>
  
  <p>Now if I have object <code>a</code>, I get the fields using reflection :</p>
  
  <pre><code>Field[] fields = a.getDeclaredFields();
  </code></pre>
  
  <p>But for field <code>property</code>, the type is returned as <code>IProp</code>. I want to get the concrete type which was assigned to it. ( There maybe multiple concrete types. I want to get the one which is assigned to the field).</p>
  
  <p>Can anyone help me out ? </p>