|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acm.seguin.refactor.undo.UndoStack
public class UndoStack
The stack of refactorings that we can undo. This stack holds all the refactorings that have occurred in the system.
This object is a singleton object because we only want one object responsible for storing the refactorings that can be undone.
| Constructor Summary | |
|---|---|
UndoStack()
Constructor for the UndoStack object |
|
| Method Summary | |
|---|---|
UndoAction |
add(Refactoring ref)
Adds a refactoring to the undo stack. |
void |
delete()
Deletes the undo stack |
void |
done()
Description of the Method |
static UndoStack |
get()
Gets the singleton undo operation |
boolean |
isStackEmpty()
Gets the StackEmpty attribute of the UndoStack object |
java.util.Iterator |
list()
Lists the undo actions in the stack |
UndoAction |
peek()
Return the top option without removing it from the stack |
void |
setUndoAction(java.lang.Class undoer)
This sets the class that holds undo actions. |
void |
undo()
Performs an undo of the top action |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UndoStack()
| Method Detail |
|---|
public void setUndoAction(java.lang.Class undoer)
throws java.lang.IllegalArgumentException
undoer - a class that implements org.acm.seguin.refactor.undo.UndoAction
java.lang.IllegalArgumentException - if the class cannot be instantiated or does not implement UndoActionpublic boolean isStackEmpty()
public UndoAction add(Refactoring ref)
ref - the refactoring about to be performed
public UndoAction peek()
public java.util.Iterator list()
public void undo()
public void done()
public void delete()
public static UndoStack get()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||