Is there any tool that might help in converting the Java code written using 1.5 to 1.4. This is required because i need to reverse engineer my project using STAR UML. and Star UML is Java 1.4 compatible.
Please Help
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Maybe you can try with retroweaver, it works on byte code level though, and I don’t know if it’s enough for your tool.
To review the changes between Java 1.4 to Java 1.5, the most important is probably generics, then auto boxing and auto unboxing, annotations, variable number of arguments, the foreach loop, and import static.
Generics: At a source code level, while you could probably get rid of generics when used as the collection element type, more difficult will be when a generic type is returned by a method.
Auto boxing/unboxing: will need explicit conversions.
Annotations: since they enable declarative programming, if used they might be difficult to substitute. With Spring, for instance you can define the same behaviour with XML, but it would be hard to convert by hand and also a bad idea.
Variable number of aguments: will have to use arrays.
Foreach loop: have to use iterators explicitely.
import static: just prepend the class name.
It was a pretty good advancement of features from Java 1.4 to 1.5, I wrote this more as a review of the changes, but unless your code is using very little of the new features you’ll end losing a lot of time and also you’ll reduce the quality of your code, so as sethu advised you probably the easier path is find another tool.