Re: [aspectwerkz-dev] custom bytecode attributes
Eugene Kuleshov <eu-E/[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.devel |
|---|---|
| Message-ID | <[email protected]> |
Michael Nascimento Santos wrote: >> Actually I can't see why this feature can't use the same attributes as > for >>JRE 1.5 annotations. It might be more heavy, but there is a whole support > of >>these attributes in asm and the good thing that they can be read using new >>reflection features in the 1.5 runtime... > > Personally, I don't like the idea of forcing the users to support JSR-175 > attributes. They have to be interfaces, you can't have more than one of each > type per class/method, besides the fact you need the attribute class to make > your app run. There's been a lot of discussions about this in the Java > community and I don't think there's been a consensus about it. That will be up to the implementation and again you will only need an interface (actually it must also have a special flag on class level) to work with these annotations trough 1.5 reflection API. > Optional support for generating 100% JSR-175 annotations using JDK 1.4 would > be great, though. And that is the whole point. ASM already provides complete support for JSR-175 metadata on the bytecode level, so if custom attributes will be based on these annotations you can read them using 1.5 reflection. Surely that bytecode can be generated and parsed back even on JRE 1.3. regards, Eugene