Composite Refactoring
v1.0

compositeRefactoring.refactoringComposite
Class RefactoringComposite_ListImpl

java.lang.Object
  |
  +--compositeRefactoring.refactoringComposite.RefactoringComponent
        |
        +--compositeRefactoring.refactoringComposite.RefactoringComposite
              |
              +--compositeRefactoring.refactoringComposite.RefactoringComposite_ListImpl
All Implemented Interfaces:
IRefactoring

public class RefactoringComposite_ListImpl
extends RefactoringComposite
implements IRefactoring

This class is an implementation of RefactoringComposite with a List (java.util.List).


Fields inherited from class compositeRefactoring.refactoringComposite.RefactoringComposite
DEFAULTNAME
 
Fields inherited from class compositeRefactoring.refactoringComposite.RefactoringComponent
fName
 
Constructor Summary
RefactoringComposite_ListImpl()
          creates a new RefactoringComposite_ListImpl object with a default name.
RefactoringComposite_ListImpl(String name)
          creates a new RefactoringComposite_ListImpl object.
RefactoringComposite_ListImpl(String name, List refParts)
          creates a new RefactoringComposite_ListImpl object and adds the RefactoringComponents to the list.
RefactoringComposite_ListImpl(String name, RefactoringComponent[] nodes)
          creates a new RefactoringComposite_ListImpl object and adds the RefactoringComponents to the list.
 
Method Summary
 void add(RefactoringComponent node)
          adds one RefactoringComponent to the CompositeList.
 void addAll(RefactoringComponent[] nodes)
          adds all elements of the array to the Compositelist.
 RefactoringStatus checkPreconditions(IProgressMonitor pm)
          checks the Preconditions of the refactoring.
 IChange createChange(IProgressMonitor pm)
          creates the change which is to be executed when performing the refactoring.
 RefactoringStatus refactor()
          this method performs the composite refactoring.
 RefactoringStatus undo()
          undos the refactoring's change.
 
Methods inherited from class compositeRefactoring.refactoringComposite.RefactoringComponent
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jdt.internal.corext.refactoring.base.IRefactoring
getName
 

Constructor Detail

RefactoringComposite_ListImpl

public RefactoringComposite_ListImpl()
creates a new RefactoringComposite_ListImpl object with a default name.

RefactoringComposite_ListImpl

public RefactoringComposite_ListImpl(String name)
creates a new RefactoringComposite_ListImpl object.
Parameters:
name - the name of the CompositeRefactoring.

RefactoringComposite_ListImpl

public RefactoringComposite_ListImpl(String name,
                                     RefactoringComponent[] nodes)
creates a new RefactoringComposite_ListImpl object and adds the RefactoringComponents to the list.
Parameters:
name - the name of the CompositeRefactoring.
nodes - the array of RefactoringComponents of this CompositeRefactoring

RefactoringComposite_ListImpl

public RefactoringComposite_ListImpl(String name,
                                     List refParts)
creates a new RefactoringComposite_ListImpl object and adds the RefactoringComponents to the list.
Parameters:
name - the name of the CompositeRefactoring.
refParts - a List of the RefactoringComponent s.
Method Detail

addAll

public void addAll(RefactoringComponent[] nodes)
adds all elements of the array to the Compositelist.
Parameters:
nodes - the array of RefactoringComponent s to be added.

add

public void add(RefactoringComponent node)
adds one RefactoringComponent to the CompositeList.
Parameters:
node - the RefactoringComponent to be added.

checkPreconditions

public RefactoringStatus checkPreconditions(IProgressMonitor pm)
                                     throws JavaModelException
checks the Preconditions of the refactoring. This method calls an Iterator which calls the checkPrecondition methods of the RefactoringComposite children.
Specified by:
checkPreconditions in interface IRefactoring
Overrides:
checkPreconditions in class RefactoringComposite
Parameters:
pm - an IProgressMonitor to monitor the method's progress
Returns:
the status of the checks.

createChange

public IChange createChange(IProgressMonitor pm)
                     throws JavaModelException
creates the change which is to be executed when performing the refactoring. This change will not be performed, the method exists just for extensibility and information! It is never called by a client currently.
Specified by:
createChange in interface IRefactoring
Overrides:
createChange in class RefactoringComposite
Parameters:
pm - an IProgressMonitor to monitor the method's progress
Returns:
the actual change

refactor

public RefactoringStatus refactor()
this method performs the composite refactoring.
Overrides:
refactor in class RefactoringComposite
Returns:
the status of the performed refactoring

undo

public RefactoringStatus undo()
undos the refactoring's change. The changes need to be undone from the last performed refactoring to the first as in a stack.
Overrides:
undo in class RefactoringComposite
Returns:
the status of the undo operation.

Composite Refactoring
v1.0