Unreflect everything

This commit is contained in:
2026-06-11 18:26:15 +02:00
parent 36b31fac77
commit f5d9c6e175
18 changed files with 217 additions and 305 deletions
@@ -26,6 +26,7 @@ import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* Uses ASM to patch class bytecode according to a list of access widener entries.
@@ -46,6 +47,11 @@ public class ClassPatcher {
this.entries = entries;
this.targets = entries.stream()
.map(AccessWidenerEntry::target)
.flatMap(s -> {
if (!s.contains("$")) return Stream.of(s);
int index = s.lastIndexOf('$');
return Stream.of(s, s.substring(0, index));
})
.collect(Collectors.toSet());
}