Class BasicRefactoringTool.ClassNameRenamer
java.lang.Object
org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
org.eclipse.persistence.jpa.jpql.parser.AbstractTraverseChildrenVisitor
org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AbstractRenamer
org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.ClassNameRenamer
- All Implemented Interfaces:
ExpressionVisitor
- Enclosing class:
BasicRefactoringTool
This visitor renames a fully qualified class name.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringThe current name of the class to rename.protected final StringThe new name of the class.Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AbstractRenamer
textEdits -
Constructor Summary
ConstructorsConstructorDescriptionClassNameRenamer(String oldClassName, String newClassName) Creates a newClassNameRenamer. -
Method Summary
Modifier and TypeMethodDescriptionvoidvisit(CollectionValuedPathExpression expression) Visits theCollectionValuedPathExpressionexpression.voidvisit(ConstructorExpression expression) Visits theConstructorExpressionexpression.protected voidvisit(Expression expression, String value, int extraOffset) Visits the given 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 givenStateObjectUpdaterwill be notified to replace the value.voidvisit(StateFieldPathExpression expression) Visits theStateFieldPathExpressionexpression.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AbstractRenamer
addTextEdit, addTextEdit, buildTextEdit, repositionMethods inherited from class org.eclipse.persistence.jpa.jpql.parser.AbstractTraverseChildrenVisitor
visitMethods inherited from class org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
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, visit, visit, visit, visit, visit, visit, visit, visit
-
Field Details
-
newClassName
The current name of the class to rename. -
oldClassName
The new name of the class.
-
-
Constructor Details
-
ClassNameRenamer
Creates a newClassNameRenamer.- Parameters:
oldClassName- The current name of the class to renamenewClassName- The new name of the class
-
-
Method Details
-
visit
Description copied from interface:ExpressionVisitorVisits theCollectionValuedPathExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Description copied from interface:ExpressionVisitorVisits theConstructorExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
Visits the given 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 givenStateObjectUpdaterwill be notified to replace the value.- Parameters:
expression- The that is being visitedvalue- The value to check if it's the old class nameextraOffset- Additional offset that will be added to the givenExpression's offset, which is the length of the string representation of what is before it
-
visit
Description copied from interface:ExpressionVisitorVisits theStateFieldPathExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-