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
protected class BasicRefactoringTool.ClassNameRenamer extends BasicRefactoringTool.AbstractRenamer
This visitor renames a fully qualified class name.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
newClassName
The current name of the class to rename.protected java.lang.String
oldClassName
The new name of the class.-
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AbstractRenamer
textEdits
-
-
Constructor Summary
Constructors Constructor Description ClassNameRenamer(java.lang.String oldClassName, java.lang.String newClassName)
Creates a newClassNameRenamer
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visit(CollectionValuedPathExpression expression)
Visits theCollectionValuedPathExpression
expression.void
visit(ConstructorExpression expression)
Visits theConstructorExpression
expression.protected void
visit(Expression expression, java.lang.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
-
-
-
-
Method Detail
-
visit
public void visit(CollectionValuedPathExpression expression)
Visits theCollectionValuedPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(ConstructorExpression expression)
Visits theConstructorExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
protected void visit(Expression expression, java.lang.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.- Parameters:
expression
- The that is being visitedextraOffset
- Additional offset that will be added to the givenExpression
's offset, which is the length of the string representation of what is before itvalue
- The value to check if it's the old class name
-
visit
public void visit(StateFieldPathExpression expression)
Visits theStateFieldPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
-