org.prorefactor.refactor
Class TempDirWrap
java.lang.Object
org.prorefactor.refactor.TempDirWrap
public class TempDirWrap
- extends java.lang.Object
Generic wrapper for refactorings which are non-interactive and
write their output to an empty output directory.
Constructor Summary |
TempDirWrap(java.lang.String outputDir)
|
Method Summary |
java.lang.String |
run(int topNode,
ILint lint,
IRefactor refactor)
Run the refactor for a given root node. |
java.lang.String |
run(java.util.TreeSet targetSet,
IRefactor refactor)
Run the refactor for a given change set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TempDirWrap
public TempDirWrap(java.lang.String outputDir)
run
public java.lang.String run(int topNode,
ILint lint,
IRefactor refactor)
throws java.io.IOException
- Run the refactor for a given root node.
Resets "messages" on each call.
- Parameters:
topnode
- The handle to the syntax tree top node.
- Returns:
- Empty string on success, otherwise an error message.
- Throws:
java.io.IOException
run
public java.lang.String run(java.util.TreeSet targetSet,
IRefactor refactor)
throws java.io.IOException
- Run the refactor for a given change set.
Does not reset "messages", so a new TempDirWrap object should be used
for each compile unit.
- Parameters:
targetSet
- The set of RefactorTarget objects.refactor
- An IRefactor object which will process the targetSet.
- Throws:
java.io.IOException
Copyright © 2008 Joanju Software. All Rights Reserved.