Package spoon.refactoring
Class CtRenameGenericVariableRefactoring
java.lang.Object
spoon.refactoring.AbstractRenameRefactoring<CtVariable>
spoon.refactoring.CtRenameGenericVariableRefactoring
- All Implemented Interfaces:
CtRefactoring
,CtRenameRefactoring<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();
-
Field Summary
Fields inherited from class spoon.refactoring.AbstractRenameRefactoring
javaIdentifierRE, newName, newNameValidationRE, target
-
Constructor Summary
-
Method Summary
Methods inherited from class spoon.refactoring.AbstractRenameRefactoring
checkNewNameIsValid, detectIssues, detectNameConflicts, getNewName, getTarget, isJavaIdentifier, refactor, setNewName, setTarget
-
Constructor Details
-
CtRenameGenericVariableRefactoring
public CtRenameGenericVariableRefactoring()
-
-
Method Details
-
refactorNoCheck
protected void refactorNoCheck()- Specified by:
refactorNoCheck
in classAbstractRenameRefactoring<CtVariable>
-