title: How to print an object's implemented class
body: <p>During debugging without the aid of an IDE(Integrated Development Environment), I would like to determine an object's class. The catch is that the object is defined as an interface and I would like to determine the Object's class that is implementing this interface. So for instance I would like to print statements in the following setter method to print the implemented class name:</p>
  
  <pre><code>public void setSomeObject(InterfaceType someObject) 
  {
     m_Object = someObject;
     System.out.println(someObject.getClass().getName());
  }
  </code></pre>
  
  <p>I am in the process of testing this code sample and will provide more feedback on this question. As per docs of the java.lang.Class and java.lang.Object api, I believe the interface name will be printed instead of the class that implemented this interface. </p>
  
  <p>My question is how does one print the name of the implemented class instead of the interface in the above code sample?</p>