protected static class RefactoringTool.ClassNameRenamer extends AbstractTraverseChildrenVisitor
| Modifier and Type | Field and Description |
|---|---|
protected RefactoringTool.StateObjectUpdater<ConstructorExpressionStateObject> |
constructorUpdater
The
RefactoringTool.StateObjectUpdater that updates the class name when notified. |
protected java.lang.String |
newClassName
The current name of the class to rename.
|
protected java.lang.String |
oldClassName
The new name of the class.
|
protected RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> |
pathExpressionUpdater
The
RefactoringTool.StateObjectUpdater that updates the state field path expression when notified. |
| Constructor and Description |
|---|
RefactoringTool.ClassNameRenamer(java.lang.String oldClassName,
java.lang.String newClassName)
Creates a new
ClassNameRenamer. |
visitvisit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitprotected RefactoringTool.StateObjectUpdater<ConstructorExpressionStateObject> constructorUpdater
RefactoringTool.StateObjectUpdater that updates the class name when notified.protected final java.lang.String newClassName
protected final java.lang.String oldClassName
protected RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> pathExpressionUpdater
RefactoringTool.StateObjectUpdater that updates the state field path expression when notified.public RefactoringTool.ClassNameRenamer(java.lang.String oldClassName,
java.lang.String newClassName)
ClassNameRenamer.oldClassName - The current name of the class to renamenewClassName - The new name of the classprotected RefactoringTool.StateObjectUpdater<ConstructorExpressionStateObject> buildConstructorUpdater()
protected RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> buildPathExpressionStateObjectUpdater()
protected RefactoringTool.StateObjectUpdater<ConstructorExpressionStateObject> constructorUpdater()
protected RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> pathExpressionUpdater()
public void visit(ConstructorExpressionStateObject stateObject)
ConstructorExpressionStateObject.visit in interface StateObjectVisitorvisit in class AnonymousStateObjectVisitorstateObject - The ConstructorExpressionStateObject to visitpublic void visit(StateFieldPathExpressionStateObject stateObject)
StateFieldPathExpressionStateObject.visit in interface StateObjectVisitorvisit in class AnonymousStateObjectVisitorstateObject - The StateFieldPathExpressionStateObject to visitprotected <T extends StateObject> void visit(T stateObject, java.lang.String value, RefactoringTool.StateObjectUpdater<T> updater)
StateObject and if its value is the same as the old class name or
if the value represents an inner class of that old class name, then the given RefactoringTool.StateObjectUpdater will be notified to replace the value.stateObject - The StateObject that is being visitedvalue - The value to check if it's the old class nameupdater - The RefactoringTool.StateObjectUpdater is notified when to replace the value