protected static class RefactoringTool.FieldNameRenamer extends AbstractTraverseChildrenVisitor
Modifier and Type | Field and Description |
---|---|
protected IManagedTypeProvider |
managedTypeProvider
The external form of a provider that gives access to the JPA metadata.
|
protected java.lang.String |
newFieldName
The new name of the attribute.
|
protected java.lang.String |
oldFieldName
The current name of the attribute to rename.
|
protected java.lang.String |
typeName
The fully qualified name of the type that got one of its attributes renamed.
|
Constructor and Description |
---|
FieldNameRenamer(IManagedTypeProvider managedTypeProvider,
java.lang.String typeName,
java.lang.String oldFieldName,
java.lang.String newFieldName)
Creates a new
AttributeNameRenamer . |
Modifier and Type | Method and Description |
---|---|
protected void |
rename(AbstractPathExpressionStateObject stateObject)
Performs the rename on the path expression.
|
void |
visit(CollectionValuedPathExpressionStateObject stateObject)
Visits the given
CollectionValuedPathExpressionStateObject . |
void |
visit(StateFieldPathExpressionStateObject stateObject)
Visits the given
StateFieldPathExpressionStateObject . |
visit
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
protected final IManagedTypeProvider managedTypeProvider
protected final java.lang.String newFieldName
protected final java.lang.String oldFieldName
protected final java.lang.String typeName
public FieldNameRenamer(IManagedTypeProvider managedTypeProvider, java.lang.String typeName, java.lang.String oldFieldName, java.lang.String newFieldName)
AttributeNameRenamer
.typeName
- The fully qualified name of the type that got one of its attributes renamedoldFieldName
- The current name of the attribute to renamenewFieldName
- The new name of the attributeprotected void rename(AbstractPathExpressionStateObject stateObject)
stateObject
- The AbstractPathExpressionStateObject
being visited, which may
have to have its path renamedpublic void visit(CollectionValuedPathExpressionStateObject stateObject)
CollectionValuedPathExpressionStateObject
.visit
in interface StateObjectVisitor
visit
in class AnonymousStateObjectVisitor
stateObject
- The CollectionValuedPathExpressionStateObject
to visitpublic void visit(StateFieldPathExpressionStateObject stateObject)
StateFieldPathExpressionStateObject
.visit
in interface StateObjectVisitor
visit
in class AnonymousStateObjectVisitor
stateObject
- The StateFieldPathExpressionStateObject
to visit