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
Fields Modifier and Type Field Description protected java.lang.String
newAttributeName
The new name of the attribute.protected java.lang.String
oldAttributeName
The current name of the attribute to rename.protected java.lang.String
typeName
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
Constructors Constructor Description AttributeNameRenamer(JPQLQueryContext queryContext, java.lang.String typeName, java.lang.String oldAttributeName, java.lang.String newAttributeName)
Creates a newAttributeNameRenamer
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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
-
-
-
-
Field Detail
-
newAttributeName
protected final java.lang.String newAttributeName
The new name of the attribute.
-
oldAttributeName
protected final java.lang.String oldAttributeName
The current name of the attribute to rename.
-
typeName
protected final java.lang.String typeName
The fully qualified name of the type that got one of its attributes renamed.
-
-
Constructor Detail
-
AttributeNameRenamer
public AttributeNameRenamer(JPQLQueryContext queryContext, java.lang.String typeName, java.lang.String oldAttributeName, java.lang.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 Detail
-
rename
protected void rename(AbstractPathExpression expression)
Performs the rename on the path expression.- Parameters:
expression
- TheAbstractPathExpression
being visited, which may have to have its path renamed
-
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(StateFieldPathExpression expression)
Visits theStateFieldPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
-