|
||||||||||
| 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.method.PushUpMethodRefactoring
org.acm.seguin.refactor.method.PushUpAbstractMethodRefactoring
public class PushUpAbstractMethodRefactoring
Pushes up the signature of an abstract method into the parent class
| Field Summary | |
|---|---|
protected java.lang.String |
method
The name of the method |
protected MethodSummary |
methodSummary
the method that is being moved around |
protected java.lang.String[] |
params
|
| 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 |
PushUpAbstractMethodRefactoring()
Constructor for the PushUpAbstractMethodRefactoring object |
| Method Summary | |
|---|---|
protected void |
addMethodToDest(ComplexTransform transform,
RemoveMethodTransform rft,
net.sourceforge.jrefactory.ast.SimpleNode methodDecl,
TypeSummary dest)
Adds the method to the destination class |
protected void |
checkDestination(TypeSummary dest)
Description of the Method |
protected FileSummary |
getFileSummary(Summary current)
Gets the package summary for the specific object |
int |
getID()
Gets the ID attribute of the PushUpAbstractMethodRefactoring 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 |
removeMethod(TypeSummary source,
ComplexTransform transform,
RemoveMethodTransform rft)
Description of the Method |
void |
setClass(java.lang.String packageName,
java.lang.String className)
Sets the Class attribute of the MethodRefactoring object |
void |
setClass(TypeSummary init)
Sets the Class attribute of the MethodRefactoring object |
void |
setMethod(MethodSummary value)
Sets the Method attribute of the PushUpMethodRefactoring object |
void |
setMethod(java.lang.String methodName)
Sets the Method attribute of the MethodRefactoring object |
void |
setParams(java.lang.String[] params)
Sets the types of the Parameters of the method of the MethodRefactoring object |
protected void |
transform()
Moves the method to the parent class |
protected net.sourceforge.jrefactory.ast.ASTMethodDeclaration |
updateMethod(net.sourceforge.jrefactory.ast.SimpleNode methodDecl)
Description of the Method |
| Methods inherited from class org.acm.seguin.refactor.method.PushUpMethodRefactoring |
|---|
getDescription, preconditions |
| 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 MethodSummary methodSummary
protected java.lang.String method
protected java.lang.String[] params
| Constructor Detail |
|---|
protected PushUpAbstractMethodRefactoring()
| Method Detail |
|---|
public int getID()
getID in class PushUpMethodRefactoringprotected void transform()
transform in class PushUpMethodRefactoringpublic void setMethod(MethodSummary value)
value - The new Method value
protected void checkDestination(TypeSummary dest)
throws RefactoringException
dest - Description of Parameter
RefactoringException - Description of Exceptionprotected net.sourceforge.jrefactory.ast.ASTMethodDeclaration updateMethod(net.sourceforge.jrefactory.ast.SimpleNode methodDecl)
methodDecl - Description of Parameter
protected void addMethodToDest(ComplexTransform transform,
RemoveMethodTransform rft,
net.sourceforge.jrefactory.ast.SimpleNode methodDecl,
TypeSummary dest)
transform - The feature to be added to the MethodToDest attributerft - The feature to be added to the MethodToDest attributemethodDecl - The feature to be added to the MethodToDest attributedest - The feature to be added to the MethodToDest attribute
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 setMethod(java.lang.String methodName)
methodName - The new Method valuepublic void setParams(java.lang.String[] params)
params - The new Parameter typesprotected 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 void removeMethod(TypeSummary source,
ComplexTransform transform,
RemoveMethodTransform rft)
source - Description of Parametertransform - Description of Parameterrft - Description of Parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||