From fe3e02550b969773a87a2aa12a63ed38f04f57c8 Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 1 Aug 2019 16:18:44 +0100 Subject: [PATCH] Rename (and flip) isMutable to isDependency --- .../java/dev/openrs2/deob/classpath/AsmClassMetadata.java | 4 ++-- .../main/java/dev/openrs2/deob/classpath/ClassMetadata.java | 2 +- .../dev/openrs2/deob/classpath/ReflectionClassMetadata.java | 4 ++-- .../main/java/dev/openrs2/deob/classpath/TypedRemapper.java | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deob/src/main/java/dev/openrs2/deob/classpath/AsmClassMetadata.java b/deob/src/main/java/dev/openrs2/deob/classpath/AsmClassMetadata.java index 12f21eab29..cdb294bbdb 100644 --- a/deob/src/main/java/dev/openrs2/deob/classpath/AsmClassMetadata.java +++ b/deob/src/main/java/dev/openrs2/deob/classpath/AsmClassMetadata.java @@ -22,8 +22,8 @@ public final class AsmClassMetadata extends ClassMetadata { } @Override - public boolean isMutable() { - return true; + public boolean isDependency() { + return false; } @Override diff --git a/deob/src/main/java/dev/openrs2/deob/classpath/ClassMetadata.java b/deob/src/main/java/dev/openrs2/deob/classpath/ClassMetadata.java index a16cfb6d46..b268e2fdb6 100644 --- a/deob/src/main/java/dev/openrs2/deob/classpath/ClassMetadata.java +++ b/deob/src/main/java/dev/openrs2/deob/classpath/ClassMetadata.java @@ -7,7 +7,7 @@ import dev.openrs2.asm.MemberDesc; public abstract class ClassMetadata { public abstract String getName(); - public abstract boolean isMutable(); + public abstract boolean isDependency(); public abstract boolean isInterface(); public abstract ClassMetadata getSuperClass(); public abstract List getSuperInterfaces(); diff --git a/deob/src/main/java/dev/openrs2/deob/classpath/ReflectionClassMetadata.java b/deob/src/main/java/dev/openrs2/deob/classpath/ReflectionClassMetadata.java index a3ed9a3670..4e45597f84 100644 --- a/deob/src/main/java/dev/openrs2/deob/classpath/ReflectionClassMetadata.java +++ b/deob/src/main/java/dev/openrs2/deob/classpath/ReflectionClassMetadata.java @@ -23,8 +23,8 @@ public final class ReflectionClassMetadata extends ClassMetadata { } @Override - public boolean isMutable() { - return false; + public boolean isDependency() { + return true; } @Override diff --git a/deob/src/main/java/dev/openrs2/deob/classpath/TypedRemapper.java b/deob/src/main/java/dev/openrs2/deob/classpath/TypedRemapper.java index 98248d821a..f05579fcd9 100644 --- a/deob/src/main/java/dev/openrs2/deob/classpath/TypedRemapper.java +++ b/deob/src/main/java/dev/openrs2/deob/classpath/TypedRemapper.java @@ -207,7 +207,7 @@ public final class TypedRemapper extends Remapper { private static String populateClassMapping(Map mapping, Map prefixes, ClassMetadata clazz) { var name = clazz.getName(); - if (mapping.containsKey(name) || EXCLUDED_CLASSES.contains(name) || !clazz.isMutable()) { + if (mapping.containsKey(name) || EXCLUDED_CLASSES.contains(name) || clazz.isDependency()) { return mapping.getOrDefault(name, name); } @@ -239,7 +239,7 @@ public final class TypedRemapper extends Remapper { for (var field : partition) { var clazz = classPath.get(field.getOwner()); - if (!clazz.isMutable()) { + if (clazz.isDependency()) { skip = true; break; } @@ -298,7 +298,7 @@ public final class TypedRemapper extends Remapper { for (var method : partition) { var clazz = classPath.get(method.getOwner()); - if (!clazz.isMutable()) { + if (clazz.isDependency()) { skip = true; break; }