I like generics a lot and use them whereever I can. Every now and then I need to use one of my classes in another project which has to run on an old JVM (before 5.0), needs to run on JavaME (where generics are not allowed neither) or in Microsoft J# (which has VERY poor Support for generics).
At the moment, I remove all generics manually, which means inserting many casts as well.
Since generics are said to be compile-time-only, and every piece of generic code could possibly converted to non-generic code automatically, I wonder if there is any tool which can do this for me.
If there is no such tool, how else could I solve the problem? Should I completely stop using generics?
There already are answers related to bytecode compability. What if I need source code compability for some reason?