Package spoon.refactoring
Interface CtRenameRefactoring<T extends CtNamedElement>
-
- All Superinterfaces:
CtRefactoring
- All Known Implementing Classes:
AbstractRenameRefactoring
,CtRenameGenericVariableRefactoring
,CtRenameLocalVariableRefactoring
public interface CtRenameRefactoring<T extends CtNamedElement> extends CtRefactoring
The kind of refactoring, which renames a `target` element to the `newName`
Usage:
CtVariable someVariable = ... new SomeRenameRefactoring().setTarget(someVariable).setNewName("mutchBetterName").refactor();
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getNewName()
T
getTarget()
CtRenameRefactoring<T>
setNewName(String newName)
CtRenameRefactoring<T>
setTarget(T target)
-
Methods inherited from interface spoon.refactoring.CtRefactoring
refactor
-
-
-
-
Method Detail
-
getTarget
T getTarget()
- Returns:
- target model element, which has to be refactored.
-
setTarget
CtRenameRefactoring<T> setTarget(T target)
- Parameters:
target
- the model element, which has to be refactored.- Returns:
- this to support fluent API
-
getNewName
String getNewName()
- Returns:
- the required name of the `target` model element
-
setNewName
CtRenameRefactoring<T> setNewName(String newName)
- Parameters:
newName
- the required name of the `target` model element- Returns:
- this to support fluent API
-
-