diff --git a/asm/src/main/java/dev/openrs2/asm/classpath/AsmClassMetadata.kt b/asm/src/main/java/dev/openrs2/asm/classpath/AsmClassMetadata.kt index c122242629..563277f526 100644 --- a/asm/src/main/java/dev/openrs2/asm/classpath/AsmClassMetadata.kt +++ b/asm/src/main/java/dev/openrs2/asm/classpath/AsmClassMetadata.kt @@ -27,7 +27,7 @@ class AsmClassMetadata( override val methods get() = clazz.methods.map(::MemberDesc) - override fun getAccess(method: MemberDesc): Int? { + override fun getMethodAccess(method: MemberDesc): Int? { return clazz.methods.find { it.name == method.name && it.desc == method.desc }?.access } } diff --git a/asm/src/main/java/dev/openrs2/asm/classpath/ClassMetadata.kt b/asm/src/main/java/dev/openrs2/asm/classpath/ClassMetadata.kt index e82a85a76e..111565c5d6 100644 --- a/asm/src/main/java/dev/openrs2/asm/classpath/ClassMetadata.kt +++ b/asm/src/main/java/dev/openrs2/asm/classpath/ClassMetadata.kt @@ -11,7 +11,7 @@ abstract class ClassMetadata { abstract val fields: List abstract val methods: List - abstract fun getAccess(method: MemberDesc): Int? + abstract fun getMethodAccess(method: MemberDesc): Int? fun isOverride(method: MemberDesc): Boolean { val superClass = this.superClass diff --git a/asm/src/main/java/dev/openrs2/asm/classpath/ReflectionClassMetadata.kt b/asm/src/main/java/dev/openrs2/asm/classpath/ReflectionClassMetadata.kt index 42d209c184..231e6e3e21 100644 --- a/asm/src/main/java/dev/openrs2/asm/classpath/ReflectionClassMetadata.kt +++ b/asm/src/main/java/dev/openrs2/asm/classpath/ReflectionClassMetadata.kt @@ -29,7 +29,7 @@ class ReflectionClassMetadata(private val classPath: ClassPath, private val claz override val methods get() = clazz.declaredMethods.map { MemberDesc(it.name, Type.getMethodDescriptor(it)) } - override fun getAccess(method: MemberDesc): Int? { + override fun getMethodAccess(method: MemberDesc): Int? { return clazz.declaredMethods.find { it.name == method.name && Type.getMethodDescriptor(it) == method.desc } ?.modifiers } diff --git a/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt b/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt index ac537a2408..ff37666812 100644 --- a/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt +++ b/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt @@ -124,7 +124,7 @@ class TypedRemapper private constructor( } for (method in clazz.methods) { - if (clazz.getAccess(method)!! and Opcodes.ACC_NATIVE != 0) { + if (clazz.getMethodAccess(method)!! and Opcodes.ACC_NATIVE != 0) { return false } } @@ -247,7 +247,7 @@ class TypedRemapper private constructor( return false } - val access = clazz.getAccess(MemberDesc(method)) + val access = clazz.getMethodAccess(MemberDesc(method)) if (access != null && access and Opcodes.ACC_NATIVE != 0) { return false } diff --git a/deob/src/main/java/dev/openrs2/deob/transform/VisibilityTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/VisibilityTransformer.kt index b2bd45b242..517fd34a16 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/VisibilityTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/VisibilityTransformer.kt @@ -95,7 +95,7 @@ class VisibilityTransformer : Transformer() { return if (overridable) { // reduce it to the weakest level required to override a dependency's method partition.filter { classPath[it.owner]!!.dependency } - .mapNotNull { classPath[it.owner]!!.getAccess(MemberDesc(it)) } + .mapNotNull { classPath[it.owner]!!.getMethodAccess(MemberDesc(it)) } .fold(visibility, ::weakestVisibility) } else { visibility