I have a simple marker annotation for methods (similar to the first example in Item 35 in Effective Java (2nd ed)):
/**
* Marker annotation for met
If you're happy to use Spring, then that does something along these lines using it's context:component-scan functionality, where Spring scans for annotated classes in a given package. Under the covers, it's pretty gruesome, and involves grubbing about on the filesystem and in JAR files looking for classes in the package.
Even if you can't use Spring directly, having a look through its source code might give you some ideas.
Certainly, the Java reflection APi is no use here, it specifically does not provide a means to obtain all classes in a package.