org.acm.seguin.refactor.type
Class RemoveClassVisitor
java.lang.Object
org.acm.seguin.summary.TraversalVisitor
org.acm.seguin.refactor.type.TypeChangeVisitor
org.acm.seguin.refactor.type.RenameClassVisitor
org.acm.seguin.refactor.type.RemoveClassVisitor
- All Implemented Interfaces:
- SummaryVisitor
public class RemoveClassVisitor
- extends RenameClassVisitor
The visitor object for removing a class from the system.
- Author:
- Chris Seguin
Constructor Summary |
RemoveClassVisitor(java.lang.String packageName,
java.lang.String oldClass,
java.lang.String initParentPackage,
java.lang.String newClass,
java.io.File base,
ComplexTransform complex)
Constructor for the remove class visitor object |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoveClassVisitor
public RemoveClassVisitor(java.lang.String packageName,
java.lang.String oldClass,
java.lang.String initParentPackage,
java.lang.String newClass,
java.io.File base,
ComplexTransform complex)
- Constructor for the remove class visitor object
- Parameters:
packageName
- the package nameoldClass
- the name of the class being deletednewClass
- the parent class of that being deletedbase
- the base directoryinitParentPackage
- Description of Parametercomplex
- Description of Parameter
getNewImports
protected AddImportTransform getNewImports(FileSummary node,
java.lang.String className)
- Gets the New Imports transform
- Overrides:
getNewImports
in class RenameClassVisitor
- Parameters:
node
- the file summaryclassName
- the name of the class that is changing
- Returns:
- The NewImports value
getNewName
protected net.sourceforge.jrefactory.ast.ASTName getNewName()
- Gets the new name
- Overrides:
getNewName
in class RenameClassVisitor
- Returns:
- an ASTName containing the new name
alreadyImportsType
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
- Overrides:
alreadyImportsType
in class RenameClassVisitor
- Parameters:
refactoring
- the complex transformationoldOne
- the old class namenode
- the file that is being changedimportedType
- the type that we are supposedly importing