|
||||||||||
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.ExtractMethodRefactoring
public class ExtractMethodRefactoring
Refactoring class that extracts a portion of the method and creates a new method with what the user has selected.
Field Summary | |
---|---|
static int |
PACKAGE
The extracted method should have package scope |
static int |
PRIVATE
The extracted method should be private |
static int |
PROTECTED
The extracted method should have protected scope |
static int |
PUBLIC
The extracted method should have public scope |
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 |
ExtractMethodRefactoring()
Constructor for the ExtractMethodRefactoring object |
Method Summary | |
---|---|
java.lang.String |
getDescription()
Gets the Description attribute of the ExtractMethodRefactoring object |
java.lang.String |
getFullFile()
Gets the FullFile attribute of the ExtractMethodRefactoring object |
int |
getID()
Gets the ID attribute of the ExtractMethodRefactoring object |
VariableSummary[] |
getParameters()
Gets the Parameters attribute of the ExtractMethodRefactoring object |
java.lang.Object |
getReturnType()
Gets the return type for the extracted method |
java.lang.Object[] |
getReturnTypes()
Gets the possible return types |
java.lang.String |
getSignature()
Gets the Signature attribute of the ExtractMethodRefactoring object |
boolean |
isStatement()
Gets the Statement attribute of the ExtractMethodRefactoring object |
protected void |
preconditions()
These items must be true before the refactoring will work |
void |
setFullFile(java.lang.String value)
Sets the FullFile attribute of the ExtractMethodRefactoring object |
void |
setFullFile(java.lang.StringBuffer value)
Sets the FullFile attribute of the ExtractMethodRefactoring object |
void |
setMethodName(java.lang.String value)
Sets the MethodName attribute of the ExtractMethodRefactoring object |
void |
setParameterOrder(java.lang.Object[] data)
Sets the order of the parameters |
void |
setProtection(int value)
Sets the Protection attribute of the ExtractMethodRefactoring object |
void |
setReturnType(java.lang.Object obj)
Sets the return type for the extracted method |
void |
setSelection(java.lang.String value)
Sets the Selection attribute of the ExtractMethodRefactoring object |
protected void |
transform()
Actually make the transformation |
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 |
---|
public static final int PRIVATE
public static final int PACKAGE
public static final int PROTECTED
public static final int PUBLIC
Constructor Detail |
---|
protected ExtractMethodRefactoring()
Method Detail |
---|
public void setFullFile(java.lang.String value)
value
- The new FullFile valuepublic void setFullFile(java.lang.StringBuffer value)
value
- The new FullFile valuepublic void setSelection(java.lang.String value) throws RefactoringException
value
- The new Selection value
RefactoringException
public void setMethodName(java.lang.String value)
value
- The new MethodName valuepublic void setParameterOrder(java.lang.Object[] data)
data
- The new ParameterOrder valuepublic void setProtection(int value)
value
- The new Protection valuepublic void setReturnType(java.lang.Object obj)
obj
- The new ReturnType valuepublic java.lang.String getDescription()
getDescription
in class Refactoring
public java.lang.String getFullFile()
public VariableSummary[] getParameters() throws RefactoringException
RefactoringException
- Description of Exceptionpublic java.lang.Object[] getReturnTypes() throws RefactoringException
RefactoringException
- problem in loading thesepublic boolean isStatement()
public java.lang.String getSignature()
public java.lang.Object getReturnType()
public int getID()
getID
in class Refactoring
protected void preconditions() throws RefactoringException
preconditions
in class Refactoring
RefactoringException
- the problem that aroseprotected void transform()
transform
in class Refactoring
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |