Remap Class.forName() calls in ClassNamePrefixer

bzip2
Graham 5 years ago
parent 3b35a39084
commit f26695a0c1
  1. 4
      deob/src/main/java/dev/openrs2/deob/ClassNamePrefixer.java

@ -4,6 +4,7 @@ import java.util.HashMap;
import dev.openrs2.asm.Library; import dev.openrs2.asm.Library;
import dev.openrs2.deob.classpath.TypedRemapper; import dev.openrs2.deob.classpath.TypedRemapper;
import dev.openrs2.deob.transform.ClassForNameTransformer;
import org.objectweb.asm.commons.ClassRemapper; import org.objectweb.asm.commons.ClassRemapper;
import org.objectweb.asm.commons.SimpleRemapper; import org.objectweb.asm.commons.SimpleRemapper;
import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.ClassNode;
@ -20,6 +21,9 @@ public final class ClassNamePrefixer {
} }
var remapper = new SimpleRemapper(mapping); var remapper = new SimpleRemapper(mapping);
var transformer = new ClassForNameTransformer(remapper);
transformer.transform(library);
for (var name : mapping.keySet()) { for (var name : mapping.keySet()) {
var in = library.remove(name); var in = library.remove(name);

Loading…
Cancel
Save