|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.acm.seguin.summary.TraversalVisitor
org.acm.seguin.refactor.type.TypeChangeVisitor
org.acm.seguin.refactor.type.RenameClassVisitor
public class RenameClassVisitor
Renames a class from one name to another.
Field Summary | |
---|---|
protected java.lang.String |
newClassName
Description of the Field |
protected java.lang.String |
oldClassName
Description of the Field |
protected java.lang.String |
packageName
Description of the Field |
Constructor Summary | |
---|---|
RenameClassVisitor(java.lang.String packageName,
java.lang.String oldClass,
java.lang.String newClass,
java.io.File base,
ComplexTransform complex)
Determine if anything in this tree references these classes. |
Method Summary | |
---|---|
protected void |
addRenamingTransforms(ComplexTransform refactoring,
FileSummary node,
java.lang.String className)
Gets the RenamingTransform |
protected void |
alreadyImportsType(ComplexTransform refactoring,
net.sourceforge.jrefactory.ast.ASTName oldOne,
FileSummary node,
TypeSummary importedType)
We are performing the transformation on a refactoring that already has that type imported from another class |
protected java.util.LinkedList |
getAppropriateClasses(FileSummary node)
Gets the AppropriateClasses attribute of the TypeChangeVisitor object |
protected java.lang.String |
getCurrentPackage()
Return the current package |
protected TransformAST |
getFileSpecificTransform(FileSummary summary)
Gets the File Specific Transform |
protected java.io.File |
getNewFile(FileSummary node)
Gets the reference to the file where the refactored output should be sent |
protected AddImportTransform |
getNewImports(FileSummary node,
java.lang.String className)
Gets the New Imports transform |
protected net.sourceforge.jrefactory.ast.ASTName |
getNewName()
Gets the new name |
protected RemoveImportTransform |
getRemoveImportTransform(ImportSummary node)
Gets the Remove Imports transform |
Methods inherited from class org.acm.seguin.refactor.type.TypeChangeVisitor |
---|
getState, preconditions, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
Methods inherited from class org.acm.seguin.summary.TraversalVisitor |
---|
visit, visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String packageName
protected java.lang.String oldClassName
protected java.lang.String newClassName
Constructor Detail |
---|
public RenameClassVisitor(java.lang.String packageName, java.lang.String oldClass, java.lang.String newClass, java.io.File base, ComplexTransform complex)
base
- the base directorypackageName
- Description of ParameteroldClass
- Description of ParameternewClass
- Description of Parametercomplex
- Description of ParameterMethod Detail |
---|
protected TransformAST getFileSpecificTransform(FileSummary summary)
getFileSpecificTransform
in class TypeChangeVisitor
summary
- Gets a file specific transform
protected AddImportTransform getNewImports(FileSummary node, java.lang.String className)
getNewImports
in class TypeChangeVisitor
node
- the file summaryclassName
- the name of the class that is changing
protected RemoveImportTransform getRemoveImportTransform(ImportSummary node)
getRemoveImportTransform
in class TypeChangeVisitor
node
- the import summary
protected java.util.LinkedList getAppropriateClasses(FileSummary node)
getAppropriateClasses
in class TypeChangeVisitor
node
- Description of Parameter
protected java.io.File getNewFile(FileSummary node)
getNewFile
in class TypeChangeVisitor
node
- the files summary
protected java.lang.String getCurrentPackage()
getCurrentPackage
in class TypeChangeVisitor
protected net.sourceforge.jrefactory.ast.ASTName getNewName()
protected void addRenamingTransforms(ComplexTransform refactoring, FileSummary node, java.lang.String className)
addRenamingTransforms
in class TypeChangeVisitor
refactoring
- the refactoringnode
- the file summary to referenceclassName
- the name of the class that is changingprotected void alreadyImportsType(ComplexTransform refactoring, net.sourceforge.jrefactory.ast.ASTName oldOne, FileSummary node, TypeSummary importedType)
refactoring
- the complex transformationoldOne
- the old class namenode
- the file that is being changedimportedType
- the type that we are supposedly importing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |