org.acm.seguin.refactor.type
Class ExtractInterfaceRefactoring

java.lang.Object
  extended by org.acm.seguin.refactor.Refactoring
      extended by org.acm.seguin.refactor.type.ExtractInterfaceRefactoring

public class ExtractInterfaceRefactoring
extends Refactoring

Refactoring that extracts the interface from the dialog

Author:
Grant Watson

Field Summary
 
Fields inherited from class org.acm.seguin.refactor.Refactoring
ADD_CHILD, ADD_PARENT, EXTRACT_INTERFACE, EXTRACT_METHOD, MOVE_METHOD, PUSH_DOWN_FIELD, PUSH_DOWN_METHOD, PUSH_UP_ABSTRACT_METHOD, PUSH_UP_FIELD, PUSH_UP_METHOD, REMOVE_CLASS, RENAME_CLASS, RENAME_FIELD, RENAME_METHOD, RENAME_PARAMETER, REPACKAGE
 
Constructor Summary
protected ExtractInterfaceRefactoring()
          Constructor for the ExtractInterfaceRefactoring object
 
Method Summary
 void addImplementingClass(java.lang.String packageName, java.lang.String className)
          Adds a class that will implement the new interface
 void addImplementingClass(TypeSummary summary)
          Adds a feature to the ImplementingClass attribute of the ExtractInterfaceRefactoring object
 java.lang.String getDescription()
          Gets the Description attribute of the ExtractInterfaceRefactoring object
 int getID()
          Gets the ID attribute of the ExtractInterfaceRefactoring object
protected  void preconditions()
          Description of the Method
 void setInterfaceName(java.lang.String interfaceName)
          Sets the interface name for the new interface.
 void setPackageName(java.lang.String packageName)
          Sets the PackageName attribute of the ExtractInterfaceRefactoring object
protected  void transform()
          this performs the refactoring
 
Methods inherited from class org.acm.seguin.refactor.Refactoring
checkDestinationFile, getComplexTransform, run, setComplexTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtractInterfaceRefactoring

protected ExtractInterfaceRefactoring()
Constructor for the ExtractInterfaceRefactoring object

Method Detail

setInterfaceName

public void setInterfaceName(java.lang.String interfaceName)
Sets the interface name for the new interface. If the name contains a package name, then the package name is also set.

Parameters:
interfaceName - The new InterfaceName value

setPackageName

public void setPackageName(java.lang.String packageName)
Sets the PackageName attribute of the ExtractInterfaceRefactoring object

Parameters:
packageName - The new PackageName value

getDescription

public java.lang.String getDescription()
Gets the Description attribute of the ExtractInterfaceRefactoring object

Specified by:
getDescription in class Refactoring
Returns:
The Description value

getID

public int getID()
Gets the ID attribute of the ExtractInterfaceRefactoring object

Specified by:
getID in class Refactoring
Returns:
The ID value

addImplementingClass

public void addImplementingClass(java.lang.String packageName,
                                 java.lang.String className)
Adds a class that will implement the new interface

Parameters:
packageName - The feature to be added to the ImplementingClass attribute
className - The feature to be added to the ImplementingClass attribute

addImplementingClass

public void addImplementingClass(TypeSummary summary)
Adds a feature to the ImplementingClass attribute of the ExtractInterfaceRefactoring object

Parameters:
summary - The feature to be added to the ImplementingClass attribute

preconditions

protected void preconditions()
                      throws RefactoringException
Description of the Method

Specified by:
preconditions in class Refactoring
Throws:
RefactoringException - Description of Exception

transform

protected void transform()
this performs the refactoring

Specified by:
transform in class Refactoring