Change how I compile methods in hopes of eliminating randomly wrong order

This commit is contained in:
libraryaddict 2020-02-26 00:22:25 +13:00
parent c5322072ae
commit e276773bf3
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4
2 changed files with 2 additions and 7 deletions

View File

@ -34,7 +34,6 @@ public class ClassGetter {
if (resource.getPath().toLowerCase().endsWith(".jar")) {
processJarfile(resource, pkgname, classes);
} else {
System.out.println("Not sure how you got here: " + resource.getPath());
for (File f : new File(resource.getPath() + "/" + pkgname.replace(".", "/")).listFiles()) {
if (!f.getName().endsWith(".class") || f.getName().contains("$")) {
continue;

View File

@ -68,18 +68,14 @@ public class CompileMethods {
if (c != FlagWatcher.class) {
addClass(classes, c.getSuperclass());
int ind = classes.indexOf(c.getSuperclass());
classes.add(ind + 1, c);
} else {
classes.add(0, c);
}
classes.add(c);
}
private static void doMethods() {
ArrayList<Class<?>> classes = ClassGetter
.getClassesForPackage(FlagWatcher.class, "me.libraryaddict.disguise.disguisetypes.watchers");
classes.add(FlagWatcher.class);
ArrayList<Class> sorted = new ArrayList<>();