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
Modifier and TypeFieldDescriptionprotected final String
The current name of the class to rename.protected final String
The new name of the class.Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AbstractRenamer
textEdits
-
Constructor Summary
ConstructorDescriptionClassNameRenamer
(String oldClassName, String newClassName) Creates a newClassNameRenamer
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
visit
(CollectionValuedPathExpression expression) Visits theCollectionValuedPathExpression
expression.void
visit
(ConstructorExpression expression) Visits theConstructorExpression
expression.protected void
visit
(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 givenStateObjectUpdater
will be notified to replace the value.void
visit
(StateFieldPathExpression expression) Visits theStateFieldPathExpression
expression.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AbstractRenamer
addTextEdit, addTextEdit, buildTextEdit, reposition
Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AbstractTraverseChildrenVisitor
visit
Methods 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:ExpressionVisitor
Visits theCollectionValuedPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theConstructorExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to 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 givenStateObjectUpdater
will 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:ExpressionVisitor
Visits theStateFieldPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-