|
||||||||||
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.field.PushDownFieldRefactoring
public class PushDownFieldRefactoring
Performs the push down field refactoring
Field Summary | |
---|---|
protected java.lang.String |
field
The name of the field |
protected TypeSummary |
typeSummary
The type summary that contains the field |
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 |
PushDownFieldRefactoring()
Constructor for the PushDownFieldRefactoring object |
Method Summary | |
---|---|
void |
addChild(java.lang.String packageName,
java.lang.String className)
Adds a child class where the field should be pushed into |
void |
addChild(TypeSummary init)
Adds a child class where the field should be pushed into |
java.lang.String |
getDescription()
Gets the description of the refactoring |
protected java.lang.Object |
getFieldType(net.sourceforge.jrefactory.ast.SimpleNode node,
FileSummary fileSummary)
Gets the FieldType attribute of the PullupFieldRefactoring object |
protected FileSummary |
getFileSummary(Summary current)
Gets the package summary for the specific object |
int |
getID()
Gets the ID attribute of the PushDownFieldRefactoring object |
protected PackageSummary |
getPackage(Summary current)
Gets the package summary for the specific object |
protected boolean |
isInJavaLang(net.sourceforge.jrefactory.ast.ASTName type)
Determines if the specified type is in java.lang package |
protected boolean |
isInJavaLang(TypeSummary type)
Determines if the specified type is in java.lang package |
protected void |
preconditions()
Preconditions that must be true for the refactoring to work |
void |
setClass(java.lang.String packageName,
java.lang.String className)
Sets the Class attribute of the PullupFieldRefactoring object |
void |
setClass(TypeSummary init)
Sets the Class attribute of the PullupFieldRefactoring object |
void |
setField(java.lang.String fieldName)
Sets the Field attribute of the PullupFieldRefactoring object |
protected void |
transform()
Actually update the files |
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 |
Field Detail |
---|
protected java.lang.String field
protected TypeSummary typeSummary
Constructor Detail |
---|
protected PushDownFieldRefactoring()
Method Detail |
---|
public java.lang.String getDescription()
getDescription
in class Refactoring
public int getID()
getID
in class Refactoring
public void addChild(java.lang.String packageName, java.lang.String className)
packageName
- the package nameclassName
- the class namepublic void addChild(TypeSummary init)
init
- The new Class valueprotected void preconditions() throws RefactoringException
preconditions
in class Refactoring
RefactoringException
- a problem with performing this
refactoringprotected void transform()
transform
in class Refactoring
public void setClass(java.lang.String packageName, java.lang.String className)
packageName
- the package nameclassName
- the class namepublic void setClass(TypeSummary init)
init
- The new Class valuepublic void setField(java.lang.String fieldName)
fieldName
- The new Field valueprotected boolean isInJavaLang(net.sourceforge.jrefactory.ast.ASTName type)
type
- the type
protected boolean isInJavaLang(TypeSummary type)
type
- the type
protected PackageSummary getPackage(Summary current)
current
- the summary
protected FileSummary getFileSummary(Summary current)
current
- the summary
protected java.lang.Object getFieldType(net.sourceforge.jrefactory.ast.SimpleNode node, FileSummary fileSummary)
node
- Description of ParameterfileSummary
- Description of Parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |