title: Java - loading annotated classes
body: <p>I know there are incredible set of tools for loading plugin classes in java, but today an idea came to my mind.</p>
  
  <p>What if I have a bunch of annotated and un-annotated classes in package "org.home.junk" (annotated with annotation "@AnnotatedClass") and those classes have annotated methods with say annotation "@AnnotatedMethod".</p>
  
  <p><strong>First question:</strong> can I at run-time get an array/collection of all the classes in that specific package, so that I could check which one's are annotated and create an instance of them. (I am aware however how to check if Some.class has annotations courtesy of this guide: <a href="http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/" rel="noreferrer">http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/</a>)</p>
  
  <p><strong>Second question:</strong> - If I can do what I'd like in first question - what would be the most political way to do this?</p>
  
  <p>I believe it is possible, as I understand JUnit loads test-case classes in some similar manner. </p>
  
  <p>Also it would be cool if this could be done with minimal third party libraries and such, again - if it's possible :)</p>