compositeRefactoring.refactoringComposite
Class RefactoringComposite_IteratorImpl
java.lang.Object
|
+--compositeRefactoring.refactoringComposite.RefactoringComponent
|
+--compositeRefactoring.refactoringComposite.RefactoringComposite
|
+--compositeRefactoring.refactoringComposite.RefactoringComposite_IteratorImpl
- All Implemented Interfaces:
- IRefactoring
- public class RefactoringComposite_IteratorImpl
- extends RefactoringComposite
- implements IRefactoring
This class is an implementation of RefactoringComposite with an Iterator Pattern.
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 |
RefactoringComposite_IteratorImpl
public RefactoringComposite_IteratorImpl(RefactoringComponent[] comps)
- creates a new RefactoringComposite_IteratorImpl object with a default name.
- Parameters:
comps
- the RefactoringComponent s of this composite.
RefactoringComposite_IteratorImpl
public RefactoringComposite_IteratorImpl(String name,
RefactoringComponent[] comps)
- creates a new RefactoringComposite_IteratorImpl object.
- Parameters:
name
- the name of the RefactoringComposite.comps
- the RefactoringComponent s of this composite.
iterator
public Iterator iterator()
- creates an instance of an
Iterator
with which the composite's components
can be visited.
- Returns:
- the
Iterator
for the composite's components.
stack
public Iterator stack()
- creates an instance of a
Stack
with which the composite's components
can be visited from top to bottom.
- Returns:
- the
Stack
for the composite's components.
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()
- this method undos the composite refactoring when it was performed.
- Overrides:
undo
in class RefactoringComposite
- Returns:
- the status of the Undo
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