org.acm.seguin.refactor.type
Class RemoveEmptyClassRefactoring

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

public class RemoveEmptyClassRefactoring
extends Refactoring

Removes a particular class that is an abstract parent.

Author:
Chris Seguin

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 RemoveEmptyClassRefactoring()
          Constructor for the RemoveEmptyClassRefactoring object
 
Method Summary
 java.lang.String getDescription()
          Gets the description of the refactoring
protected  FileSummary getFileSummary()
          Gets the FileSummary attribute of the RemoveEmptyClassRefactoring object
 int getID()
          Gets the id for this refactoring to track which refactorings are used.
protected  void preconditions()
          Checks the preconditions that must be true for this refactoring to be applied.
 void setClass(java.lang.String packageName, java.lang.String className)
          Sets the ChildClass attribute of the RemoveAbstractParent object
 void setClass(TypeSummary summary)
          Sets the ChildClass attribute of the RemoveAbstractParent object
protected  void transform()
          Performs the refactoring by traversing through the files and updating them.
 
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

RemoveEmptyClassRefactoring

protected RemoveEmptyClassRefactoring()
Constructor for the RemoveEmptyClassRefactoring object

Method Detail

setClass

public void setClass(java.lang.String packageName,
                     java.lang.String className)
Sets the ChildClass attribute of the RemoveAbstractParent object

Parameters:
packageName - The new Class value
className - The new Class value

setClass

public void setClass(TypeSummary summary)
Sets the ChildClass attribute of the RemoveAbstractParent object

Parameters:
summary - The new Class value

getDescription

public java.lang.String getDescription()
Gets the description of the refactoring

Specified by:
getDescription in class Refactoring
Returns:
the description

getID

public int getID()
Gets the id for this refactoring to track which refactorings are used.

Specified by:
getID in class Refactoring
Returns:
the id

getFileSummary

protected FileSummary getFileSummary()
Gets the FileSummary attribute of the RemoveEmptyClassRefactoring object

Returns:
The FileSummary value

preconditions

protected void preconditions()
                      throws RefactoringException
Checks the preconditions that must be true for this refactoring to be applied.

Specified by:
preconditions in class Refactoring
Throws:
RefactoringException - The exception

transform

protected void transform()
Performs the refactoring by traversing through the files and updating them.

Specified by:
transform in class Refactoring