Class BasicRefactoringTool.EnumConstantRenamer
- 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.EnumConstantRenamer
-
- All Implemented Interfaces:
ExpressionVisitor
- Enclosing class:
- BasicRefactoringTool
protected class BasicRefactoringTool.EnumConstantRenamer extends BasicRefactoringTool.AbstractRenamer
This visitor renames an enum constant. An enum constant is represented by a path expression.
-
-
Field Summary
Fields Modifier and Type Field Description protected IManagedTypeProvider
managedTypeProvider
The external form of a provider that gives access to the JPA metadata.protected java.lang.String
newEnumConstant
The current name of the enum constant to rename.protected java.lang.String
oldEnumConstant
The new name of the enum constant.-
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AbstractRenamer
textEdits
-
-
Constructor Summary
Constructors Constructor Description EnumConstantRenamer(IManagedTypeProvider managedTypeProvider, java.lang.String oldEnumConstant, java.lang.String newEnumConstant)
Creates a newClassNameRenamer
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
renameEnumConstant(AbstractPathExpression 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
-
managedTypeProvider
protected final IManagedTypeProvider managedTypeProvider
The external form of a provider that gives access to the JPA metadata.
-
newEnumConstant
protected final java.lang.String newEnumConstant
The current name of the enum constant to rename.
-
oldEnumConstant
protected final java.lang.String oldEnumConstant
The new name of the enum constant.
-
-
Constructor Detail
-
EnumConstantRenamer
public EnumConstantRenamer(IManagedTypeProvider managedTypeProvider, java.lang.String oldEnumConstant, java.lang.String newEnumConstant)
Creates a newClassNameRenamer
.- Parameters:
managedTypeProvider
- The provider of managed typesoldEnumConstant
- The new name of the enum constantnewEnumConstant
- The current name of the enum constant to rename
-
-
Method Detail
-
renameEnumConstant
protected void renameEnumConstant(AbstractPathExpression expression)
-
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
-
-