|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bankframe.admin.tools.migrate.MigrateTool
public class 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(String replaceTextPath,
File fileToProcess)
MigrateTool constructor |
|
| Method Summary | |
|---|---|
static void |
displayUsage()
Display this tools' usage information |
void |
loadTextToReplace(String propertiesPath)
This method loads the specified properties file |
static void |
main(String[] args)
This method starts the application. |
void |
processDirectory(File dirToProcess)
This method processes a directory of Java files |
void |
processFile(File file)
This method processes a single file |
boolean |
searchAndReplace(Reader in,
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(String replaceTextPath,
File fileToProcess)
replaceTextPath - Path to the properties file containing text that should be replacedfileToProcess - Path of the file ( or directory ) to process| Method Detail |
|---|
public static void displayUsage()
public void loadTextToReplace(String propertiesPath)
throws IOException
propertiesPath - Path to the properties file
Exception
IOExceptionpublic static void main(String[] args)
args - an array of command-line arguments
public void processDirectory(File dirToProcess)
throws IOException
dirToProcess - Path of directory to process
IOException - Thrown if an error occurs processing the directory
public void processFile(File file)
throws IOException
file - File path of file to process
IOException - Thrown if the file does not exist or is read only
public boolean searchAndReplace(Reader in,
Writer out)
throws IOException
in - java.io.Reader Input streamout - java.io.Writer Output stream
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 | |||||||||