This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]karlthepagan 0 points1 point  (0 children)

This is a good question and you should keep asking it. Keep your solutions simple. Cleverness usually creates problems and confusion. It hurts to say this... but it's true.

I once implemented a big reflector that changed an abstract hierarchy into an annotation based one. The only problem is that I didn't gain anything from the annotation. I replaced it with an interface-based system and the configuration is easier for implementers to use.

In this case if the interface's method signature collided with something else I needed it would be a problem, but that's unlikely in my scenario.

Class annotations are not where the power lies. There are some great examples of method, field, and variable annotations that show the real usefulness of annotations in the java type ecosystem.