EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql
Class RefactoringTool.ClassNameRenamer

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.model.query.AnonymousStateObjectVisitor
      extended by org.eclipse.persistence.jpa.jpql.model.query.AbstractTraverseChildrenVisitor
          extended by org.eclipse.persistence.jpa.jpql.RefactoringTool.ClassNameRenamer
All Implemented Interfaces:
StateObjectVisitor
Enclosing class:
RefactoringTool

protected static class RefactoringTool.ClassNameRenamer
extends AbstractTraverseChildrenVisitor

This visitor renames a fully qualified class name.


Field Summary
protected  RefactoringTool.StateObjectUpdater<ConstructorExpressionStateObject> constructorUpdater
          The RefactoringTool.StateObjectUpdater that updates the class name when notified.
protected  java.lang.String newClassName
          The current name of the class to rename.
protected  java.lang.String oldClassName
          The new name of the class.
protected  RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> pathExpressionUpdater
          The RefactoringTool.StateObjectUpdater that updates the state field path expression when notified.
 
Constructor Summary
RefactoringTool.ClassNameRenamer(java.lang.String oldClassName, java.lang.String newClassName)
          Creates a new ClassNameRenamer.
 
Method Summary
protected  RefactoringTool.StateObjectUpdater<ConstructorExpressionStateObject> buildConstructorUpdater()
           
protected  RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> buildPathExpressionStateObjectUpdater()
           
protected  RefactoringTool.StateObjectUpdater<ConstructorExpressionStateObject> constructorUpdater()
           
protected  RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> pathExpressionUpdater()
           
 void visit(ConstructorExpressionStateObject stateObject)
          Visits the given ConstructorExpressionStateObject.
 void visit(StateFieldPathExpressionStateObject stateObject)
          Visits the given StateFieldPathExpressionStateObject.
protected
<T extends StateObject>
void
visit(T stateObject, java.lang.String value, RefactoringTool.StateObjectUpdater<T> updater)
          Visits the given StateObject and if its value is the same as the old class name or if the value represents an inner class of that old class name, then the given RefactoringTool.StateObjectUpdater will be notified to replace the value.
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.model.query.AbstractTraverseChildrenVisitor
visit
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constructorUpdater

protected RefactoringTool.StateObjectUpdater<ConstructorExpressionStateObject> constructorUpdater
The RefactoringTool.StateObjectUpdater that updates the class name when notified.


newClassName

protected final java.lang.String newClassName
The current name of the class to rename.


oldClassName

protected final java.lang.String oldClassName
The new name of the class.


pathExpressionUpdater

protected RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> pathExpressionUpdater
The RefactoringTool.StateObjectUpdater that updates the state field path expression when notified.

Constructor Detail

RefactoringTool.ClassNameRenamer

public RefactoringTool.ClassNameRenamer(java.lang.String oldClassName,
                                        java.lang.String newClassName)
Creates a new ClassNameRenamer.

Parameters:
oldClassName - The current name of the class to rename
newClassName - The new name of the class
Method Detail

buildConstructorUpdater

protected RefactoringTool.StateObjectUpdater<ConstructorExpressionStateObject> buildConstructorUpdater()

buildPathExpressionStateObjectUpdater

protected RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> buildPathExpressionStateObjectUpdater()

constructorUpdater

protected RefactoringTool.StateObjectUpdater<ConstructorExpressionStateObject> constructorUpdater()

pathExpressionUpdater

protected RefactoringTool.StateObjectUpdater<StateFieldPathExpressionStateObject> pathExpressionUpdater()

visit

public void visit(ConstructorExpressionStateObject stateObject)
Visits the given ConstructorExpressionStateObject.

Specified by:
visit in interface StateObjectVisitor
Overrides:
visit in class AnonymousStateObjectVisitor
Parameters:
stateObject - The ConstructorExpressionStateObject to visit

visit

public void visit(StateFieldPathExpressionStateObject stateObject)
Visits the given StateFieldPathExpressionStateObject.

Specified by:
visit in interface StateObjectVisitor
Overrides:
visit in class AnonymousStateObjectVisitor
Parameters:
stateObject - The StateFieldPathExpressionStateObject to visit

visit

protected <T extends StateObject> void visit(T stateObject,
                                             java.lang.String value,
                                             RefactoringTool.StateObjectUpdater<T> updater)
Visits the given StateObject and if its value is the same as the old class name or if the value represents an inner class of that old class name, then the given RefactoringTool.StateObjectUpdater will be notified to replace the value.

Parameters:
stateObject - The StateObject that is being visited
value - The value to check if it's the old class name
updater - The RefactoringTool.StateObjectUpdater is notified when to replace the value

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference