title: Accessing every child class of parent class in Java
body: <p>I have to implement a logic whereby given a child class, I need to access its parent class and all other child class of that parent class, if any. I did not find any API in Java Reflection which allows us to access all child classes of a parent class. Is there any way to do it?</p>
  
  <p>For example:</p>
  
  <pre><code>class B extends class A
  class C extends class A
  </code></pre>
  
  <p>Now using class B, I can find the superclass by calling <code>getSuperClass()</code>. But is there any way to find all the child classes once I have the parent class i.e. class B and class C??</p>