|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acm.seguin.refactor.Refactoring
org.acm.seguin.refactor.type.AddClassRefactoring
public abstract class AddClassRefactoring
Adds a class that is either a parent or a child of an existing class.
| 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 | |
|---|---|
AddClassRefactoring()
Constructor for the AddClassRefactoring object |
|
| Method Summary | |
|---|---|
protected void |
addTargetClass(TypeSummary summary)
Adds a target class - either the parent or the child, depending on what we are adding |
protected abstract void |
createClass(TypeSummary existingType,
java.lang.String className)
Creates a class |
protected java.lang.String |
getNewClassName()
Gets the name of the new class |
protected void |
preconditions()
Describes the preconditions that must be true for this refactoring to be applied |
protected void |
setNewClassName(java.lang.String value)
Sets the name of the new class |
protected void |
transform()
Performs the transform on the rest of the classes |
protected abstract void |
transformOriginal(TypeSummary typeSummary)
Transforms the original AST |
| Methods inherited from class org.acm.seguin.refactor.Refactoring |
|---|
checkDestinationFile, getComplexTransform, getDescription, getID, run, setComplexTransform |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AddClassRefactoring()
| Method Detail |
|---|
protected void setNewClassName(java.lang.String value)
value - the name of the new classprotected java.lang.String getNewClassName()
protected void addTargetClass(TypeSummary summary)
summary - the summary to be extended
protected void preconditions()
throws RefactoringException
preconditions in class RefactoringRefactoringException - thrown if one or more of the
preconditions is not satisfied. The text of the exception provides a
hint of what went wrong.protected void transform()
transform in class Refactoring
protected abstract void createClass(TypeSummary existingType,
java.lang.String className)
existingType - the existing typeclassName - the name of the new classprotected abstract void transformOriginal(TypeSummary typeSummary)
typeSummary - the particular type that is being changed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||