Class RefactoringTool.ClassNameRenamer
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.model.query.AnonymousStateObjectVisitor
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractTraverseChildrenVisitor
org.eclipse.persistence.jpa.jpql.tools.RefactoringTool.ClassNameRenamer
- All Implemented Interfaces:
StateObjectVisitor
- Enclosing class:
RefactoringTool
This visitor renames a fully qualified class name.
-
Field Summary
FieldsModifier and TypeFieldDescriptionTheRefactoringTool.StateObjectUpdaterthat updates the class name when notified.protected final StringThe current name of the class to rename.protected final StringThe new name of the class.TheRefactoringTool.StateObjectUpdaterthat updates the state field path expression when notified. -
Constructor Summary
ConstructorsConstructorDescriptionClassNameRenamer(String oldClassName, String newClassName) Creates a newClassNameRenamer. -
Method Summary
Modifier and TypeMethodDescriptionvoidvisit(ConstructorExpressionStateObject stateObject) Visits the givenConstructorExpressionStateObject.voidvisit(StateFieldPathExpressionStateObject stateObject) Visits the givenStateFieldPathExpressionStateObject.protected <T extends StateObject>
voidvisit(T stateObject, String value, RefactoringTool.StateObjectUpdater<T> updater) Visits the givenStateObjectand 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 givenRefactoringTool.StateObjectUpdaterwill be notified to replace the value.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractTraverseChildrenVisitor
visitMethods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AnonymousStateObjectVisitor
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, visit, visit
-
Field Details
-
constructorUpdater
TheRefactoringTool.StateObjectUpdaterthat updates the class name when notified. -
newClassName
The current name of the class to rename. -
oldClassName
The new name of the class. -
pathExpressionUpdater
protected RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> pathExpressionUpdaterTheRefactoringTool.StateObjectUpdaterthat updates the state field path expression when notified.
-
-
Constructor Details
-
ClassNameRenamer
Creates a newClassNameRenamer.- Parameters:
oldClassName- The current name of the class to renamenewClassName- The new name of the class
-
-
Method Details
-
buildConstructorUpdater
protected RefactoringTool.StateObjectUpdater<ConstructorExpressionStateObject> buildConstructorUpdater() -
buildPathExpressionStateObjectUpdater
protected RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> buildPathExpressionStateObjectUpdater() -
constructorUpdater
-
pathExpressionUpdater
protected RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> pathExpressionUpdater() -
visit
Description copied from interface:StateObjectVisitorVisits the givenConstructorExpressionStateObject.- Specified by:
visitin interfaceStateObjectVisitor- Overrides:
visitin classAnonymousStateObjectVisitor- Parameters:
stateObject- TheConstructorExpressionStateObjectto visit
-
visit
Description copied from interface:StateObjectVisitorVisits the givenStateFieldPathExpressionStateObject.- Specified by:
visitin interfaceStateObjectVisitor- Overrides:
visitin classAnonymousStateObjectVisitor- Parameters:
stateObject- TheStateFieldPathExpressionStateObjectto visit
-
visit
protected <T extends StateObject> void visit(T stateObject, String value, RefactoringTool.StateObjectUpdater<T> updater) Visits the givenStateObjectand 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 givenRefactoringTool.StateObjectUpdaterwill be notified to replace the value.- Parameters:
stateObject- TheStateObjectthat is being visitedvalue- The value to check if it's the old class nameupdater- TheRefactoringTool.StateObjectUpdateris notified when to replace the value
-