|
||||||||||
| 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
org.acm.seguin.refactor.type.AddAbstractParent
public class AddAbstractParent
Adds an abstract parent to a class or a set of classes in the same package. The parent class that is created must be in the same package as the child classes that extend it. It is created with the package level scope, to minimize interactions elsewhere in the system. However, the other source files that import this class are proactively updated to minimize the name conflicts in the event that the user later wants to make the abstract class a public 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 | |
|---|---|
protected |
AddAbstractParent()
Constructor for the AddAbstractParent object |
| Method Summary | |
|---|---|
void |
addChildClass(java.lang.String packageName,
java.lang.String className)
Sets the ChildClass attribute of the AddClassRefactoring object |
void |
addChildClass(TypeSummary summary)
Sets the ChildClass attribute of the AddClassRefactoring object |
protected void |
createClass(TypeSummary existingType,
java.lang.String className)
Creates a class |
java.lang.String |
getDescription()
Gets the description of the refactoring |
int |
getID()
Gets the id for this refactoring to track which refactorings are used. |
void |
setParentName(java.lang.String parent)
Sets the ParentName attribute of the AddAbstractParent object |
protected void |
transformOriginal(TypeSummary typeSummary)
Transforms the original AST |
| Methods inherited from class org.acm.seguin.refactor.type.AddClassRefactoring |
|---|
addTargetClass, getNewClassName, preconditions, setNewClassName, transform |
| 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 |
|---|
protected AddAbstractParent()
| Method Detail |
|---|
public void setParentName(java.lang.String parent)
parent - The new ParentName valuepublic java.lang.String getDescription()
getDescription in class Refactoringpublic int getID()
getID in class Refactoring
public void addChildClass(java.lang.String packageName,
java.lang.String className)
packageName - The feature to be added to the ChildClass attributeclassName - The feature to be added to the ChildClass attributepublic void addChildClass(TypeSummary summary)
summary - The feature to be added to the ChildClass attribute
protected void createClass(TypeSummary existingType,
java.lang.String className)
createClass in class AddClassRefactoringexistingType - the existing typeclassName - the name of the new classprotected void transformOriginal(TypeSummary typeSummary)
transformOriginal in class AddClassRefactoringtypeSummary - the particular type that is being changed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||