org.acm.seguin.refactor
Class RefactoringFactory

java.lang.Object
  extended by org.acm.seguin.refactor.RefactoringFactory
Direct Known Subclasses:
JBuilderRefactoringFactory

public class RefactoringFactory
extends java.lang.Object

Factory for all refactorings

Author:
Chris Seguin

Constructor Summary
protected RefactoringFactory()
          Constructor for the RefactoringFactory object
 
Method Summary
 AddChildRefactoring addChild()
          Adds a feature to the Child attribute of the TypeRefactoringFactory object
 AddAbstractParent addParent()
          Adds a feature to the Parent attribute of the TypeRefactoringFactory object
 ExtractInterfaceRefactoring extractInterface()
          Extracts the interface of a class into a new interface object
 ExtractMethodRefactoring extractMethod()
          Extracts code from one method to create a new method
static RefactoringFactory get()
          A standard method to get the factory
 MoveClass moveClass()
          Creates a move class refactoring object
 MoveMethodRefactoring moveMethod()
          Moves the method into another class
protected  void prepare()
          Prepare to create a refactoring that operates on files on the disk.
 PushDownFieldRefactoring pushDownField()
          Moves the field into the parent class
 PushDownMethodRefactoring pushDownMethod()
          Moves the method into a child class
 PushUpAbstractMethodRefactoring pushUpAbstractMethod()
          Moves the method signature into the parent class
 PushUpFieldRefactoring pushUpField()
          Moves the field into the child class
 PushUpMethodRefactoring pushUpMethod()
          Moves the method into the parent class
 RemoveEmptyClassRefactoring removeEmptyClass()
          Description of the Method
 RenameClassRefactoring renameClass()
          Description of the Method
 RenameFieldRefactoring renameField()
          Renames a field
 RenameMethodRefactoring renameMethod()
          Moves the method into another class
 RenameParameterRefactoring renameParameter()
          Renames a parameter
static void setSingleton(RefactoringFactory value)
          This allows someone to replace this factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RefactoringFactory

protected RefactoringFactory()
Constructor for the RefactoringFactory object

Method Detail

addChild

public AddChildRefactoring addChild()
Adds a feature to the Child attribute of the TypeRefactoringFactory object

Returns:
Description of the Returned Value

addParent

public AddAbstractParent addParent()
Adds a feature to the Parent attribute of the TypeRefactoringFactory object

Returns:
Description of the Returned Value

moveClass

public MoveClass moveClass()
Creates a move class refactoring object

Returns:
the move class refactoring object

renameClass

public RenameClassRefactoring renameClass()
Description of the Method

Returns:
Description of the Returned Value

removeEmptyClass

public RemoveEmptyClassRefactoring removeEmptyClass()
Description of the Method

Returns:
Description of the Returned Value

extractInterface

public ExtractInterfaceRefactoring extractInterface()
Extracts the interface of a class into a new interface object

Returns:
Description of the Returned Value

pushDownField

public PushDownFieldRefactoring pushDownField()
Moves the field into the parent class

Returns:
Description of the Returned Value

renameField

public RenameFieldRefactoring renameField()
Renames a field

Returns:
The refactoring

pushUpField

public PushUpFieldRefactoring pushUpField()
Moves the field into the child class

Returns:
Description of the Returned Value

pushUpMethod

public PushUpMethodRefactoring pushUpMethod()
Moves the method into the parent class

Returns:
Description of the Returned Value

pushUpAbstractMethod

public PushUpAbstractMethodRefactoring pushUpAbstractMethod()
Moves the method signature into the parent class

Returns:
Description of the Returned Value

pushDownMethod

public PushDownMethodRefactoring pushDownMethod()
Moves the method into a child class

Returns:
Description of the Returned Value

moveMethod

public MoveMethodRefactoring moveMethod()
Moves the method into another class

Returns:
Description of the Returned Value

renameMethod

public RenameMethodRefactoring renameMethod()
Moves the method into another class

Returns:
Description of the Returned Value

renameParameter

public RenameParameterRefactoring renameParameter()
Renames a parameter

Returns:
Description of the Returned Value

extractMethod

public ExtractMethodRefactoring extractMethod()
Extracts code from one method to create a new method

Returns:
Description of the Returned Value

prepare

protected void prepare()
Prepare to create a refactoring that operates on files on the disk. This is an IDE's last opportunity to save files before the refactoring is performed. This is not used for ExtractMethod which works on code that is in memory (rather than on the disk)


setSingleton

public static void setSingleton(RefactoringFactory value)
This allows someone to replace this factory

Parameters:
value - The new Singleton value

get

public static RefactoringFactory get()
A standard method to get the factory

Returns:
Description of the Returned Value