title: get all (derived) interfaces of a class
body: <p><code>java.lang.Class.getInterfaces</code> returns all directly implemented interfaces ie doesn't walk the class tree to get all interfaces of all parent types. eg For example the hierarchy</p>
  
  <pre><code>public interface A {}
  public interface B {}
  public interface C extends B {}
  
  public class Foo implements A {} // Foo.class.getInterfaces() returns [A]
  public class Bar implements C {} // Bar.class.getInterfaces() returns [C], note B is not included.
  </code></pre>
  
  <p>For <code>Bar</code> I would like to get <code>[B, C]</code>, but for any arbitrary tree depth.</p>
  
  <p>I could write this myself, but I'm sure a library must exist that does this already, any ideas?</p>