Auto convert java source to use generic rather than raw types

Posted by Sam on Stack Overflow See other posts from Stack Overflow or by Sam
Published on 2010-04-01T14:26:38Z Indexed on 2010/04/01 19:03 UTC
Read the original article Hit count: 317

Filed under:
|
|

Is there a way/tool to auto convert Java source code from using raw types to using generic types?

I have some legacy code with 677 references to raw types:

ArrayList   47
Vector      420
Hashtable   61
Enumeration 64
Class       7
Iterator    78
TOTAL       677

Now I could manually look through the code to infer the generic types and replace, but that is going to take a long time.

© Stack Overflow or respective owner

Related posts about java

Related posts about generics