Group isClassRenamable with populateClassMapping

Signed-off-by: Graham <gpe@openrs2.dev>
master
Graham 5 years ago
parent b0dddff729
commit c4ea6cf150
  1. 28
      deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt

@ -130,6 +130,20 @@ class TypedRemapper private constructor(
return mappedName
}
private fun isClassRenamable(clazz: ClassMetadata): Boolean {
if (clazz.name in EXCLUDED_CLASSES || clazz.dependency) {
return false
}
for (method in clazz.methods) {
if (clazz.getAccess(method)!! and Opcodes.ACC_NATIVE != 0) {
return false
}
}
return true
}
private fun createFieldMapping(
classPath: ClassPath,
disjointSet: DisjointSet<MemberRef>,
@ -186,20 +200,6 @@ class TypedRemapper private constructor(
return true
}
private fun isClassRenamable(clazz: ClassMetadata): Boolean {
if (clazz.name in EXCLUDED_CLASSES || clazz.dependency) {
return false
}
for (method in clazz.methods) {
if (clazz.getAccess(method)!! and Opcodes.ACC_NATIVE != 0) {
return false
}
}
return true
}
fun isMethodRenamable(classPath: ClassPath, partition: DisjointSet.Partition<MemberRef>): Boolean {
for (method in partition) {
val clazz = classPath[method.owner]!!

Loading…
Cancel
Save