On Fri, 17 Sep 2004 01:20:33 +0800, Niclas Hedhman <[EMAIL PROTECTED]> wrote:

Ok, but end of the day, isn't the @Dependency annotation ending up inside a
Java2v5 compliant environment, and by that has to be read by the Merlin
runtime, i.e. the Meta package? Or are you suggesting that the APT somehow
generates .xinfo files for the current Meta to read?

Annotations can be used in several ways:

- Read them using Reflection at runtime (RetentionPolicy.RUNTIME).

- Keep them in the class files for later instrumentation, but don't keep them accessible at runtime (RetentionPolicy.CLASS). Instrumentation can be done with a post-processor or using the java.lang.instrument package at load time.

- Just use them for apt (RetentionPolicy.SOURCE).

- Any combination of the above, e.g. for both generating files *and* using them at runtime.

You only need apt if you want to generate files (be it Java sources or something else). In this case, apt provides you with an API to help you working with the annotated sources.

What I'm proposing is RetentionPolicy.SOURCE for all annotations and simply generating .xinfo files, just like the current JavaDoc based processor does, as an alternative to the current system.

cu,
   Raffi

--
raffael herzog
software engineer

codeshack ag
smart software solutions

hardstrasse 219, postfach
8037 zurich - switzerland

tel: +41 43 444 65 65
fax: +41 43 444 65 66

[EMAIL PROTECTED]
www.codeshack.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to