for (int i = 0; i < files.length; ++i) {
optimize(files[i], d, mapping);
}
} else if (f.getName().endsWith(".class")) {
ConstantPool cp = new ConstantPool();
ClassReader cr = new ClassReader(new FileInputStream(f));
ClassWriter cw = new ClassWriter(0);
ClassConstantsCollector ccc = new ClassConstantsCollector(cw, cp);
ClassOptimizer co = new ClassOptimizer(ccc, mapping);
cr.accept(co, ClassReader.SKIP_DEBUG);
Set constants = new TreeSet(new ConstantComparator());
constants.addAll(cp.values());
cr = new ClassReader(cw.toByteArray());
cw = new ClassWriter(0);
Iterator i = constants.iterator();
while (i.hasNext()) {
Constant c = (Constant) i.next();
c.write(cw);
}
cr.accept(cw, ClassReader.SKIP_DEBUG);
String n = mapping.map(co.getClassName());
File g = new File(d, n + ".class");
if (!g.exists() || g.lastModified() < f.lastModified()) {
g.getParentFile().mkdirs();