EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

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

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
      extended by org.eclipse.persistence.jpa.jpql.parser.AbstractTraverseChildrenVisitor
          extended by org.eclipse.persistence.jpa.jpql.BasicRefactoringTool.AbstractRenamer
              extended by org.eclipse.persistence.jpa.jpql.BasicRefactoringTool.ClassNameRenamer
All Implemented Interfaces:
ExpressionVisitor
Enclosing class:
BasicRefactoringTool

protected class BasicRefactoringTool.ClassNameRenamer
extends BasicRefactoringTool.AbstractRenamer

This visitor renames a fully qualified class name.


Field Summary
protected  java.lang.String newClassName
          The current name of the class to rename.
protected  java.lang.String oldClassName
          The new name of the class.
 
Fields inherited from class org.eclipse.persistence.jpa.jpql.BasicRefactoringTool.AbstractRenamer
textEdits
 
Constructor Summary
BasicRefactoringTool.ClassNameRenamer(java.lang.String oldClassName, java.lang.String newClassName)
          Creates a new ClassNameRenamer.
 
Method Summary
 void visit(ConstructorExpression expression)
          Visits the ConstructorExpression expression.
protected  void visit(Expression expression, java.lang.String value, int extraOffset)
          Visits the given 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 StateObjectUpdater will be notified to replace the value.
 void visit(StateFieldPathExpression expression)
          Visits the StateFieldPathExpression expression.
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.

Constructor Detail

BasicRefactoringTool.ClassNameRenamer

public BasicRefactoringTool.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

visit

public void visit(ConstructorExpression expression)
Visits the ConstructorExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

visit

protected void visit(Expression expression,
                     java.lang.String value,
                     int extraOffset)
Visits the given 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 StateObjectUpdater will be notified to replace the value.

Parameters:
expression - The that is being visited
extraOffset - Additional offset that will be added to the given Expression's offset, which is the length of the string representation of what is before it
value - The value to check if it's the old class name
updater - The StateObjectUpdater is notified when to replace the value

visit

public void visit(StateFieldPathExpression expression)
Visits the StateFieldPathExpression expression.

Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class AnonymousExpressionVisitor
Parameters:
expression - The Expression to visit

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference