org.prorefactor.refactor.action
Class RenameFilesRefactor

java.lang.Object
  extended by org.prorefactor.refactor.action.RenameFilesRefactor

public class RenameFilesRefactor
extends java.lang.Object

Change file references (run and include) for an input from/to name mapping.

Input names map is a string of comma separated old/new name pairs, those separated by newlines.

Enhancements needed: Add support for quoted filenames with embedded spaces in the regular expression search and replace part of this.


Constructor Summary
RenameFilesRefactor(java.lang.String namesMap)
          See the class notes for details about the format of the input names map.
 
Method Summary
 void close()
          Release temp files and other resources.
 int examine(ParseUnit pu)
          Examine one parse unit, keeping a list of file changes to make.
 java.io.File getLogFile()
          Call close(), to flush the log file buffer, before looking at this file's contents.
 void writeChanges(java.lang.String outDir)
           
 void zzDebugDbContents()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenameFilesRefactor

public RenameFilesRefactor(java.lang.String namesMap)
                    throws java.io.IOException
See the class notes for details about the format of the input names map.

Throws:
java.io.IOException
Method Detail

close

public void close()
           throws java.io.IOException
Release temp files and other resources.

Throws:
java.io.IOException

examine

public int examine(ParseUnit pu)
            throws RefactorException,
                   java.io.IOException
Examine one parse unit, keeping a list of file changes to make.

Throws:
RefactorException
java.io.IOException

getLogFile

public java.io.File getLogFile()
Call close(), to flush the log file buffer, before looking at this file's contents.


writeChanges

public void writeChanges(java.lang.String outDir)
                  throws java.io.IOException
Throws:
java.io.IOException

zzDebugDbContents

public void zzDebugDbContents()
                       throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2008 Joanju Software. All Rights Reserved.