|
||||||||||
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.AddChildRefactoring
public class AddChildRefactoring
Adds a child class and makes sure that the rest of the system is ready to have a class with that name.
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 |
AddChildRefactoring()
Constructor for the AddChildRefactoring object |
Method Summary | |
---|---|
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 |
setChildName(java.lang.String value)
Sets the name of the child class to be created |
void |
setPackageName(java.lang.String value)
Sets the name of the package of the new child class |
void |
setParentClass(java.lang.String packageName,
java.lang.String className)
Sets the ChildClass attribute of the AddClassRefactoring object |
void |
setParentClass(TypeSummary summary)
Sets the ChildClass attribute of the AddClassRefactoring 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 AddChildRefactoring()
Method Detail |
---|
public void setChildName(java.lang.String value)
value
- the name of the child classpublic void setParentClass(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 setParentClass(TypeSummary summary)
summary
- The feature to be added to the ChildClass attributepublic void setPackageName(java.lang.String value)
value
- the package namepublic java.lang.String getDescription()
getDescription
in class Refactoring
public int getID()
getID
in class Refactoring
protected void createClass(TypeSummary existingType, java.lang.String className)
createClass
in class AddClassRefactoring
existingType
- the existing typeclassName
- the name of the new classprotected void transformOriginal(TypeSummary typeSummary)
transformOriginal
in class AddClassRefactoring
typeSummary
- the particular type that is being changed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |