title: How can I enumerate all classes in a package and add them to a List?
body: <p>I need to enumerate all classes in a package and add them to a List. The non-dynamic version for a single class goes like this:</p>
  
  <pre><code>List allClasses = new ArrayList();
  allClasses.add(String.class);
  </code></pre>
  
  <p>How can I do this dynamically to add all classes in a package and all its subpackages?</p>
  
  <hr>
  
  <p><strong><em>Update:</em></strong> Having read the early answers, it's absolutely true that I'm trying to solve another secondary problem, so let me state it. And I know this is possible since other tools do it. See new question <a href="https://stackoverflow.com/questions/176913/how-can-i-run-all-unit-tests-except-those-ending-in-integrationtest-in-my-intel">here</a>. </p>
  
  <p><strong><em>Update:</em></strong> Reading this again, I can see how it's being misread. I'm looking to enumerate all of MY PROJECT'S classes from the file system after compilation. </p>