Move isMethodRenamable below createMethodMapping for consistency

Signed-off-by: Graham <gpe@openrs2.dev>
bzip2
Graham 5 years ago
parent 6be3f915f0
commit 626202b451
  1. 34
      deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt

@ -218,23 +218,6 @@ class TypedRemapper private constructor(
return generateName(prefixes, prefix.indefiniteArticle() + prefix.capitalize())
}
fun isMethodRenamable(classPath: ClassPath, partition: DisjointSet.Partition<MemberRef>): Boolean {
for (method in partition) {
val clazz = classPath[method.owner]!!
if (method.name in EXCLUDED_METHODS || clazz.dependency) {
return false
}
val access = clazz.getAccess(MemberDesc(method))
if (access != null && access and Opcodes.ACC_NATIVE != 0) {
return false
}
}
return true
}
private fun createMethodMapping(
classPath: ClassPath,
disjointSet: DisjointSet<MemberRef>
@ -255,5 +238,22 @@ class TypedRemapper private constructor(
return mapping
}
fun isMethodRenamable(classPath: ClassPath, partition: DisjointSet.Partition<MemberRef>): Boolean {
for (method in partition) {
val clazz = classPath[method.owner]!!
if (method.name in EXCLUDED_METHODS || clazz.dependency) {
return false
}
val access = clazz.getAccess(MemberDesc(method))
if (access != null && access and Opcodes.ACC_NATIVE != 0) {
return false
}
}
return true
}
}
}

Loading…
Cancel
Save