Class BasicRefactoringTool.AttributeNameRenamer
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.AttributeNameRenamer
- All Implemented Interfaces:
ExpressionVisitor
- Enclosing class:
BasicRefactoringTool
protected class BasicRefactoringTool.AttributeNameRenamer
extends BasicRefactoringTool.AbstractRenamer
This visitor renames any segment of a path expression.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
The new name of the attribute.protected final String
The current name of the attribute to rename.protected final String
The fully qualified name of the type that got one of its attributes renamed.Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AbstractRenamer
textEdits
-
Constructor Summary
ConstructorDescriptionAttributeNameRenamer
(JPQLQueryContext queryContext, String typeName, String oldAttributeName, String newAttributeName) Creates a newAttributeNameRenamer
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
rename
(AbstractPathExpression expression) Performs the rename on the path expression.void
visit
(CollectionValuedPathExpression expression) Visits theCollectionValuedPathExpression
expression.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, visit
-
Field Details
-
newAttributeName
The new name of the attribute. -
oldAttributeName
The current name of the attribute to rename. -
typeName
The fully qualified name of the type that got one of its attributes renamed.
-
-
Constructor Details
-
AttributeNameRenamer
public AttributeNameRenamer(JPQLQueryContext queryContext, String typeName, String oldAttributeName, String newAttributeName) Creates a newAttributeNameRenamer
.- Parameters:
queryContext
- The context used to query information about the JPQL querytypeName
- The fully qualified name of the type that got one of its attributes renamedoldAttributeName
- The current name of the attribute to renamenewAttributeName
- The new name of the attribute
-
-
Method Details
-
rename
Performs the rename on the path expression.- Parameters:
expression
- TheAbstractPathExpression
being visited, which may have to have its path renamed
-
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 theStateFieldPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-