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
public boolean isMutable() {
return true;
public boolean isDependency() {
return false;
}
@Override

@ -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<ClassMetadata> getSuperInterfaces();

@ -23,8 +23,8 @@ public final class ReflectionClassMetadata extends ClassMetadata {
}
@Override
public boolean isMutable() {
return false;
public boolean isDependency() {
return true;
}
@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) {
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;
}

Loading…
Cancel
Save