*/
public class patchclass {
public static void main(String[] argv) {
String[] file_name = new String[argv.length];
int files = 0;
ClassParser parser = null;
JavaClass java_class;
if(argv.length < 3) {
System.err.println("Usage: patch <oldstring> <newstring> file1.class ...");
System.exit(-1);
}
try {
for(int i=2; i < argv.length; i++) {
file_name[files++] = argv[i];
}
for(int i=0; i < files; i++) {
parser = new ClassParser(file_name[i]);
java_class = parser.parse();
patchIt(argv[0], argv[1],
java_class.getConstantPool().getConstantPool());
// Dump the changed class to a new file