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.StringnewAttributeNameThe new name of the attribute.protected java.lang.StringoldAttributeNameThe current name of the attribute to rename.protected java.lang.StringtypeNameThe 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 voidrename(AbstractPathExpression expression)Performs the rename on the path expression.voidvisit(CollectionValuedPathExpression expression)Visits theCollectionValuedPathExpressionexpression.voidvisit(StateFieldPathExpression expression)Visits theStateFieldPathExpressionexpression.-
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- TheAbstractPathExpressionbeing visited, which may have to have its path renamed
-
visit
public void visit(CollectionValuedPathExpression expression)
Visits theCollectionValuedPathExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(StateFieldPathExpression expression)
Visits theStateFieldPathExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
-