Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
I have a use case wherein i have multiple classes and i am trying to annotate all of those classes. I am trying to build a map of all the annotated fields of all the classes at startup with the actual field names so that when a user gives me annotated field name i can map it to actual field names.
So my first start was to create my own annotation class and annotate all the fields of the classes with it providing a name. But how do i build a map and find out all the classes that are annotated with my annotation.
First of all, your annotation needs a retention policy "runtime". Then, you can scan the classpath for all classes containing certain annotations. There are libraries out there that do it, just google for classpath scanning and annotations.
Villains always have antidotes. They're funny that way. Here's an antidote disguised as a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss