Class CtRenameGenericVariableRefactoring

All Implemented Interfaces:
CtRefactoring, CtRenameRefactoring<CtVariable>

public class CtRenameGenericVariableRefactoring extends AbstractRenameRefactoring<CtVariable>
Spoon model that can refactor any type of variable (method parameters, local variables, field variables. Provides no variable rename checking, so renaming variables to a name that already exists is possible, be wary of creating incorrect code with this. This class can be used as a tool for investigating code obfuscation. Useful for research purposes. It has the same interface as the local variable rename:
 new CtRenameGenericVariableRefactoring().setTarget(myVar).setNewName("myNewName").refactor();