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
Modifier and TypeFieldDescriptionprotected final IManagedTypeProvider
The external form of a provider that gives access to the JPA metadata.protected final String
The current name of the enum constant to rename.protected final String
The new name of the enum constant.Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.BasicRefactoringTool.AbstractRenamer
textEdits
-
Constructor Summary
ConstructorDescriptionEnumConstantRenamer
(IManagedTypeProvider managedTypeProvider, String oldEnumConstant, String newEnumConstant) Creates a newClassNameRenamer
. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Field Details
-
managedTypeProvider
The external form of a provider that gives access to the JPA metadata. -
newEnumConstant
The current name of the enum constant to rename. -
oldEnumConstant
The new name of the enum constant.
-
-
Constructor Details
-
EnumConstantRenamer
public EnumConstantRenamer(IManagedTypeProvider managedTypeProvider, String oldEnumConstant, 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 Details
-
renameEnumConstant
-
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
-