I have this class:
public class TimeIntCo<T> extends TimeValueCo<Integer>
{
}
I decided that the T type is not needed anymore, and it is not used in the class (I know it is always Integer).
However, I have a lot of references for the class that looks like TimeIntCo<Integer>
.
Is there a way using Eclipse refactoring to remove the T
type without causing any error in references?
I mean to do it in one step and not find&replace.
EDIT: to be more clear - if I just remove T
from class I have about 10,000 errors, I don't want to do it manually, and I prefer not to use find&replace because I consider refactor safer.
I doubt that there is a refactor for this. Just delete the <T>
, save the file, and go through and fix any compilation errors that might result. (If the T
type parameter is not used, there shouldn't be any compilation errors to correct ...)
@ohadshai comments:
then I have about 10,000 errors in eclipse...
I bet that most of them can be fixed by changing a small number of subclass declarations.
Do you know any other IDE that does that? IDEA?
No I don't. Refactors are generally used for simple transformations that preserve the meaning of the original source code. This transformation is unlikely to do that.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments