On Oct 27, 2006, at 12:13 PM, David Blevins wrote:

So added a finder for searching for classes that have a specific annotation, etc. It's there it works and is better than some of the code i've seen that does the same, but... I still hate it as like all the approaches I've seen it loads the classes and uses reflection to determine if the annotation is present.

This is the most insecure code I can think of, so I'm yanking it in leu of an asm-based approach. So take this as your warning not to start consuming the ClassFinder just yet.


Done. It's now ASM-based and you can lookup any of the following annotated things:

  - Packages
  - Classes
  - Constructors
  - Methods
  - Fields

Reflection does not occur till you ask for a set of classes that have the annotation you require. The loaded classes are then kept for future use.

-David


Reply via email to