I have a lot of Java 1.4 code, which I am in the process of migrating Java 5. I fix all compiler warnings about the use of raw types in classes with parameters, and am wondering if there is a device that can automatically convert something:
list MyList = new ArrayList (); MyList.add ("foo"); String foo = (string) myList.get (0); From:
list & lt; String & gt; MyList = new Arsèchchi & lt; String & gt; (); MyList.add ("foo"); String foo = myList.get (0); I understand that generics are quite complex and therefore do not expect that such a tool will be able to choose the right parameter type in all cases. However, as long as it can handle simple matters (like above), and will not break my code, I will be satisfied.
Similarly, I would like to replace all old schools in Loops, Java 5 to simplify the loop.
Is such a tool present?
I will use such eclipses.
Select the package structure that you need to upgrade, then right click -> refactor -> take the usual type of arguments
Imho it's the one you need Starting point for
Comments
Post a Comment