|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.acm.seguin.refactor.Refactoring
org.acm.seguin.refactor.type.RenameClassRefactoring
public class RenameClassRefactoring
Main program for renaming a class.
Field Summary | |
---|---|
protected java.io.File |
base
The root directory |
protected java.lang.String |
newClassName
The new name of the class |
protected java.lang.String |
oldClassName
The name of the class |
protected java.lang.String |
srcPackage
The source package |
Fields inherited from class org.acm.seguin.refactor.Refactoring |
---|
ADD_CHILD, ADD_PARENT, EXTRACT_INTERFACE, EXTRACT_METHOD, MOVE_METHOD, PUSH_DOWN_FIELD, PUSH_DOWN_METHOD, PUSH_UP_ABSTRACT_METHOD, PUSH_UP_FIELD, PUSH_UP_METHOD, REMOVE_CLASS, RENAME_CLASS, RENAME_FIELD, RENAME_METHOD, RENAME_PARAMETER, REPACKAGE |
Constructor Summary | |
---|---|
protected |
RenameClassRefactoring()
Constructor for repackage |
Method Summary | |
---|---|
java.lang.String |
getDescription()
Gets the description of the refactoring |
protected FileSummary |
getFileSummary()
Gets the file summary that we are changing |
int |
getID()
Gets the id for this refactoring to track which refactorings are used. |
protected void |
preconditions()
Preconditions for the refactoring to be applied |
void |
setDirectory(java.lang.String dir)
Set the directory |
void |
setNewClassName(java.lang.String value)
Sets the NewClassName attribute of the RenameClass object |
void |
setOldClassName(java.lang.String value)
Sets the OldClassName attribute of the RenameClass object |
protected void |
transform()
The transformation of all the source files |
Methods inherited from class org.acm.seguin.refactor.Refactoring |
---|
checkDestinationFile, getComplexTransform, run, setComplexTransform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.File base
protected java.lang.String oldClassName
protected java.lang.String newClassName
protected java.lang.String srcPackage
Constructor Detail |
---|
protected RenameClassRefactoring()
Method Detail |
---|
public void setDirectory(java.lang.String dir)
dir
- the initial directorypublic void setOldClassName(java.lang.String value)
value
- The new OldClassName valuepublic void setNewClassName(java.lang.String value)
value
- The new NewClassName valuepublic java.lang.String getDescription()
getDescription
in class Refactoring
public int getID()
getID
in class Refactoring
protected FileSummary getFileSummary()
protected void preconditions() throws RefactoringException
preconditions
in class Refactoring
RefactoringException
- Description of Exceptionprotected void transform()
transform
in class Refactoring
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |