Shame on you, Jon. :-) Annotations are not pesky, nor are they compiled
out. They are available at runtime via reflection if you give them the
correct retention policy (RetentionPolicy.RUNTIME).
But, you can't find all classes at runtime that have a specific annotation,
just like you can't find all classes that implement an interface. You need
to do some sort of pre-processing using APT to lookup those classes and
write them to a file or something (like I do with my Hibernate APT
processor).
-----Original Message-----
From: inmanjon@xxxxxxxx [mailto:inmanjon@xxxxxxxx]
Sent: Tuesday, July 11, 2006 11:33 AM
To: James Carman
Cc: users@xxxxxxxxxx; esumerfd@xxxxxxxxxxxxxx
Subject: RE: [cinjug-users] Searching for annotations
Hello,
It wouldn't seem you could find those pesky things in a jar?
I think they are compiled out, at least the ones where somebody has built
their own annotation factory most certainly are. Can you find the runtime
ones?
I was happily surprised to see them in JavaDoc, but yeah some bean
reflection or javadoc stud could probably find those.
good luck..
---- James Carman <james@xxxxxxxxxxxxxxxxxxxx> wrote:
> What are you trying to do?
>
>
>
> _____
>
> From: Edward Sumerfield [mailto:esumerfd@xxxxxxxxx]
> Sent: Tuesday, July 11, 2006 10:32 AM
> To: users@xxxxxxxxxx
> Subject: [cinjug-users] Searching for annotations
>
>
>
> Are there any libraries out there that would help me find my annotations
at
> the classpath or jar level?
>
> --
> Ed
>
---------
You may unsubscribe from this mailing list
by sending a blank email addressed to:
users-unsubscribe@xxxxxxxxxx
--
Find additional help by sending a blank email
addressed to:
users-help@xxxxxxxxxx
|