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
protected static class RefactoringTool.EnumConstantRenamer extends AbstractTraverseChildrenVisitor
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.
-
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(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 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(AbstractPathExpressionStateObject stateObject)
-
visit
public void visit(CollectionValuedPathExpressionStateObject stateObject)
Visits the givenCollectionValuedPathExpressionStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheCollectionValuedPathExpressionStateObject
to visit
-
visit
public void visit(StateFieldPathExpressionStateObject stateObject)
Visits the givenStateFieldPathExpressionStateObject
.- Specified by:
visit
in interfaceStateObjectVisitor
- Overrides:
visit
in classAnonymousStateObjectVisitor
- Parameters:
stateObject
- TheStateFieldPathExpressionStateObject
to visit
-
-