Class RefactoringTool.EnumConstantRenamer
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.model.query.AnonymousStateObjectVisitor
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractTraverseChildrenVisitor
org.eclipse.persistence.jpa.jpql.tools.RefactoringTool.EnumConstantRenamer
- All Implemented Interfaces:
StateObjectVisitor
- Enclosing class:
RefactoringTool
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. -
Constructor Summary
ConstructorDescriptionEnumConstantRenamer
(IManagedTypeProvider managedTypeProvider, String oldEnumConstant, String newEnumConstant) Creates a newClassNameRenamer
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
renameEnumConstant
(AbstractPathExpressionStateObject stateObject) void
visit
(CollectionValuedPathExpressionStateObject stateObject) Visits the givenCollectionValuedPathExpressionStateObject
.void
visit
(StateFieldPathExpressionStateObject stateObject) Visits the givenStateFieldPathExpressionStateObject
.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractTraverseChildrenVisitor
visit
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AnonymousStateObjectVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, 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:StateObjectVisitor
Visits the givenCollectionValuedPathExpressionStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheCollectionValuedPathExpressionStateObject
to visit
-
visit
Description copied from interface:StateObjectVisitor
Visits the givenStateFieldPathExpressionStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheStateFieldPathExpressionStateObject
to visit
-