has anybody experience with using Java 5 annotations on a pre-Java 5 platform, e.g., J2SE1.4? Because Retroweaver leaves the 1.5 annotations intact within the transformed class file I have written a small - not generic - framework to deal with annotations in the same way one would expect with Java 5, i.e., same syntax when accessing annotation data and decorator classes for annotation detection using reflection (java.lang Class resp. java.lang.reflect.Method decorator). My solution is based on the ASM bytecode engineering library and can be used with classes that use Java 5 annotations and that have been transformed using Retroweaver to 1.4 bytecode.
Is anyone aware of such "annotation backport solutions" already in place?
Have a look at http://sourceforge.net/projects/retrotranslator
I'd appreciate it that if you plan on advertising your on (directly competing) project on my forums, that you'd at least identify yourself as the author.
I'd like to also note that Retrotranslator operates on annotations by opening up an InputStream directly to the class files at runtime. I'm not sure that approach works under all enviroments (e.g. application servers, applets, and Java Web Start). This is one aspect that Retroweaver has paid particularly close attention to.
Annotations are a work in progress for Retroweaver, and are scheduled for release shortly after the 1.2 release.
Sorry about that, I only answered the question, but I undoubtedly had to say that I'm the Retrotranslator author.
Thanks for your comments on Retrotranslator's approach to implement reflection on annotations, I will be really glad to see a more robust implementation in Retroweaver. In fact, the lack of support for runtime annotations in Retroweaver was the main reason for me to start the development of Retrotranslator.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.