|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bankframe.admin.tools.migrate.MigrateTool
Migration tool, used to update import statements in java files
Creation date: (5/24/00 3:56:15 PM)
Usage:
java com.bankframe.admin.tools.migrate.MigrateTool [-r TextToReplace.properties] [-f] -p file.java
#oldtext=newtext
com.bankframe.old.package=com.bankframe.new.package
Constructor Summary | |
MigrateTool(java.lang.String replaceTextPath,
java.io.File fileToProcess)
MigrateTool constructor |
Method Summary | |
static void |
displayUsage()
Display this tools' usage information |
void |
loadTextToReplace(java.lang.String propertiesPath)
This method loads the specified properties file |
static void |
main(java.lang.String[] args)
This method starts the application. |
void |
processDirectory(java.io.File dirToProcess)
This method processes a directory of Java files |
void |
processFile(java.io.File file)
This method processes a single file |
boolean |
searchAndReplace(java.io.Reader in,
java.io.Writer out)
This mehod does a search and replace the specified input stream, writing changes to the output stream |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MigrateTool(java.lang.String replaceTextPath, java.io.File fileToProcess)
replaceTextPath
- Path to the properties file containing text that should be replacedfileToProcess
- Path of the file ( or directory ) to processMethod Detail |
public static void displayUsage()
public void loadTextToReplace(java.lang.String propertiesPath) throws java.io.IOException
propertiesPath
- Path to the properties file
java.lang.Exception
java.io.IOException
public static void main(java.lang.String[] args)
args
- an array of command-line argumentspublic void processDirectory(java.io.File dirToProcess) throws java.io.IOException
dirToProcess
- Path of directory to process
java.io.IOException
- Thrown if an error occurs processing the directorypublic void processFile(java.io.File file) throws java.io.IOException
java.io.IOException
- Thrown if the file does not exist or is read onlypublic boolean searchAndReplace(java.io.Reader in, java.io.Writer out) throws java.io.IOException
in
- java.io.Reader Input streamout
- java.io.Writer Output stream
java.io.IOException
- Thrown if an error occurs reading from or writing to the streams
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |