title: How to list all Classes an Object extends in Java?
body: <p>In Java, I'm using the decorator pattern.  Sometimes an <code>Object</code> gets many types as it can be decorated with many classes. How can i get all the different types of an Object?</p>
  
  <pre><code>abstract class: plate
  concrete class: JapanesePlate, WesternPlate
  
  abstract plateDecorator extends plate
  concrete decorators: MeatPlateDecorator, TomatoPlateDecorator,
  </code></pre>
  
  <p>Sometimes, a <code>JapanesePlate</code> can be decorated with <code>MeatPlateDecorator</code> or  <code>TomatoPlateDecorator</code> or both.</p>
  
  <p>I just want to know whether there is any way I can know this?</p>