Rename (and flip) isMutable to isDependency

master
Graham 5 years ago
parent 40caf973ab
commit fe3e02550b
  1. 4
      deob/src/main/java/dev/openrs2/deob/classpath/AsmClassMetadata.java
  2. 2
      deob/src/main/java/dev/openrs2/deob/classpath/ClassMetadata.java
  3. 4
      deob/src/main/java/dev/openrs2/deob/classpath/ReflectionClassMetadata.java
  4. 6
      deob/src/main/java/dev/openrs2/deob/classpath/TypedRemapper.java

@ -22,8 +22,8 @@ public final class AsmClassMetadata extends ClassMetadata {
} }
@Override @Override
public boolean isMutable() { public boolean isDependency() {
return true; return false;
} }
@Override @Override

@ -7,7 +7,7 @@ import dev.openrs2.asm.MemberDesc;
public abstract class ClassMetadata { public abstract class ClassMetadata {
public abstract String getName(); public abstract String getName();
public abstract boolean isMutable(); public abstract boolean isDependency();
public abstract boolean isInterface(); public abstract boolean isInterface();
public abstract ClassMetadata getSuperClass(); public abstract ClassMetadata getSuperClass();
public abstract List<ClassMetadata> getSuperInterfaces(); public abstract List<ClassMetadata> getSuperInterfaces();

@ -23,8 +23,8 @@ public final class ReflectionClassMetadata extends ClassMetadata {
} }
@Override @Override
public boolean isMutable() { public boolean isDependency() {
return false; return true;
} }
@Override @Override

@ -207,7 +207,7 @@ public final class TypedRemapper extends Remapper {
private static String populateClassMapping(Map<String, String> mapping, Map<String, Integer> prefixes, ClassMetadata clazz) { private static String populateClassMapping(Map<String, String> mapping, Map<String, Integer> prefixes, ClassMetadata clazz) {
var name = clazz.getName(); 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); return mapping.getOrDefault(name, name);
} }
@ -239,7 +239,7 @@ public final class TypedRemapper extends Remapper {
for (var field : partition) { for (var field : partition) {
var clazz = classPath.get(field.getOwner()); var clazz = classPath.get(field.getOwner());
if (!clazz.isMutable()) { if (clazz.isDependency()) {
skip = true; skip = true;
break; break;
} }
@ -298,7 +298,7 @@ public final class TypedRemapper extends Remapper {
for (var method : partition) { for (var method : partition) {
var clazz = classPath.get(method.getOwner()); var clazz = classPath.get(method.getOwner());
if (!clazz.isMutable()) { if (clazz.isDependency()) {
skip = true; skip = true;
break; break;
} }

Loading…
Cancel
Save