title: Java - Getting all the classes that extend an Abstract Class
body: <p>Okay, so I'm starting to use Abstract classes, but I have a question : I have this <code>abstract class Quest</code>. My objective is to, when initializing a <code>new Quest</code> object, give it a random <code>Quest</code> type (Represented by a class extending Quest). For now my code is : </p>
  
  <pre><code>switch (r) {
      case 0:
          quest = new Bandit_Raids2();
          break;
      case 1:
          quest = new Bandit_Raids();
          break;
      case 2:
          quest = new Escort_Mission();
  }
  </code></pre>
  
  <p>Is there any way to do this automatically, or just cleaner ?</p>