|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.prorefactor.refactor.Rollback
public class Rollback
A refactoring "roll back" restores files which were preserved before a refactoring was run.
Field Summary | |
---|---|
static ICallback |
externPreModify
This callback allows an external package to be notivied when an existing file has been preserved before rollback, in other words, it's about to be modified or deleted. |
Constructor Summary | |
---|---|
Rollback()
We only support one Rollback at a time (no real plans to support multiple rollbacks either.) Creating a new Rollback wipes out the previous one. |
Method Summary | |
---|---|
void |
clearRollback()
Clears the list of rollback changes, clears the rollback directory. |
java.lang.String |
getChangeList()
Get a String description of the file changes. |
static Rollback |
getCurrent()
Get the current rollback. |
java.util.ArrayList |
getFileChanges()
Returns the list of FileChange objects which was added to during the last refactoring. |
void |
preserve(java.lang.String refname,
java.lang.String fullpath)
Preserve (copy) a file to the "rollback" directory. |
void |
preserveAndWrite(int handle,
java.lang.String refname,
java.lang.String fullpath)
Preserve a file in the "rollback" directory, and then write to it. |
void |
preserveMove(java.lang.String refname,
java.lang.String fullpath)
Preserve (move) a file to the "rollback" directory. |
void |
registerNewFile(java.lang.String refname,
java.lang.String fullpath)
Keep track of files which were newly generated by the refactoring. |
java.lang.String |
rollback()
Roll back the file changes that were made with the previous refactoring. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static ICallback externPreModify
Constructor Detail |
---|
public Rollback()
Method Detail |
---|
public void clearRollback() throws java.io.IOException
java.io.IOException
public java.lang.String getChangeList()
public static Rollback getCurrent()
public java.util.ArrayList getFileChanges()
public void preserve(java.lang.String refname, java.lang.String fullpath) throws java.io.IOException
refname
- The name that the file was referred to with.fullpath
- The full path to the file.
java.io.IOException
public void preserveMove(java.lang.String refname, java.lang.String fullpath)
refname
- The name that the file was referred to with.fullpath
- The full path to the file.
java.io.IOException
public void preserveAndWrite(int handle, java.lang.String refname, java.lang.String fullpath) throws java.io.IOException
handle
- Handle to the top/first node/token.refname
- The name that was used for referring to this file.fullpath
- The full path to the file.
java.io.IOException
public void registerNewFile(java.lang.String refname, java.lang.String fullpath)
refname
- Relative filename for use with PROPATH. Probably not
relevent for this type of a FileChange object.fullpath
- Fully qualified path to the file.public java.lang.String rollback()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |