|
Composite Refactoring v1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--compositeRefactoring.RefactoringComponentFactory
RefactoringComponentFactory is a convenience class for creating simple RefactoringComponents.
It takes the role of the org.eclipse.jdt.internal.ui.refactoring.* classes which prepare and create
refactorings. It is also possible to create Refactorings without using RefactoringComponentFactory.
There is also a static reference for the top-level RefactoringComponent
for passing betweeen
action classes.
Constructor Summary | |
RefactoringComponentFactory()
|
Method Summary | |
static void |
example_Iterator_Strategy()
This is an example for the composition of Refactorings. |
static void |
example_List_Strategy()
This is an example for the composition of Refactorings. |
static RefactoringComponent |
getRefactoringComponent()
Returns the static reference of a RefactoringComponent . |
static RefactoringComponent |
newPullUpMethodRefactoring(IMethod[] members)
creates a RefactoringComponent representing a PullUpRefactoring for a method. |
static RefactoringComponent |
newRenameFieldRefactoring(IField field,
String newName)
creates a RefactoringComponent representing a RenameFieldRefactoring. |
static RefactoringComponent |
newRenameMethodRefactoring(IMethod method,
String newName)
creates a RefactoringComponent representing a RenameMethodRefactoring. |
static RefactoringComponent |
newRenameTypeRefactoring(IType type,
String newName)
creates a RefactoringComponent representing a RenameTypeRefactoring. |
static void |
setRefactoringComponent(RefactoringComponent comp)
Sets a static reference to a RefactoringComponent . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RefactoringComponentFactory()
Method Detail |
public static void setRefactoringComponent(RefactoringComponent comp)
RefactoringComponent
.comp
- the RefactoringComponent
to be set.public static RefactoringComponent getRefactoringComponent()
RefactoringComponent
.RefactoringComponent
reference.public static void example_List_Strategy()
Cars
,
which is located in the workspace of Eclipse. Here, the composition is accomplished with a list.public static void example_Iterator_Strategy()
Cars
,
which is located in the workspace of Eclipse. Here, the composition is accomplished with an
iterator strategy.public static RefactoringComponent newRenameTypeRefactoring(IType type, String newName)
RefactoringComponent
representing a RenameTypeRefactoring.type
- the type to be renamed.newName
- the new name of the type.RefactoringComponent
enclosing the RenameTypeRefactoring.public static RefactoringComponent newRenameFieldRefactoring(IField field, String newName)
RefactoringComponent
representing a RenameFieldRefactoring.field
- the field to be renamed.newName
- the new name of the type.RefactoringComponent
enclosing the RenameFieldRefactoring.public static RefactoringComponent newRenameMethodRefactoring(IMethod method, String newName)
RefactoringComponent
representing a RenameMethodRefactoring.method
- the method to be renamed.newName
- the new name of the type.RefactoringComponent
enclosing the RenameTMethodRefactoring.public static RefactoringComponent newPullUpMethodRefactoring(IMethod[] members)
RefactoringComponent
representing a PullUpRefactoring for a method.members
- the methods to be pulled up. The array's first entry will be pulled up.
All other entries will be deleted (it is assumed that all members are the same methods but in
different classes with the same superclass).RefactoringComponent
enclosing the RenameTypeRefactoring.
|
Composite Refactoring v1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |