From 49a90c1cf54397605ffe933c0a44d5ca36cab5bc Mon Sep 17 00:00:00 2001 From: Graham Date: Fri, 24 Apr 2020 23:24:11 +0100 Subject: [PATCH] Rename getNode() to getClassNode() Signed-off-by: Graham --- asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt | 2 +- .../java/dev/openrs2/deob/transform/ConstantArgTransformer.kt | 2 +- .../main/java/dev/openrs2/deob/transform/CounterTransformer.kt | 2 +- .../main/java/dev/openrs2/deob/transform/ResetTransformer.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt b/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt index abd0bebe5b..a94a38deee 100644 --- a/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt +++ b/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt @@ -73,7 +73,7 @@ class ClassPath( return@computeIfAbsent ReflectionClassMetadata(this, clazz) } - fun getNode(name: String): ClassNode? { + fun getClassNode(name: String): ClassNode? { for (library in libraries) { val clazz = library[name] if (clazz != null) { diff --git a/deob/src/main/java/dev/openrs2/deob/transform/ConstantArgTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/ConstantArgTransformer.kt index 6cd222cdd3..4c44489dcf 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/ConstantArgTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/ConstantArgTransformer.kt @@ -95,7 +95,7 @@ class ConstantArgTransformer : Transformer() { private fun analyzeMethod(classPath: ClassPath, ref: MemberRef) { // find ClassNode/MethodNode - val owner = classPath.getNode(ref.owner) ?: return + val owner = classPath.getClassNode(ref.owner) ?: return val originalMethod = owner.methods.singleOrNull { it.name == ref.name && it.desc == ref.desc } ?: return if (!originalMethod.hasCode()) { return diff --git a/deob/src/main/java/dev/openrs2/deob/transform/CounterTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/CounterTransformer.kt index 0f831d9c02..948834af8c 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/CounterTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/CounterTransformer.kt @@ -77,7 +77,7 @@ class CounterTransformer : Transformer() { continue } - val owner = classPath.getNode(counter.owner)!! + val owner = classPath.getClassNode(counter.owner)!! owner.fields.removeIf { it.name == counter.name && it.desc == counter.desc } counters.add(counter) } diff --git a/deob/src/main/java/dev/openrs2/deob/transform/ResetTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/ResetTransformer.kt index b5a2668441..06c68d84a5 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/ResetTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/ResetTransformer.kt @@ -33,7 +33,7 @@ class ResetTransformer : Transformer() { val masterReset = findMasterReset(method) ?: continue logger.info { "Identified master reset method $masterReset" } - val resetClass = classPath.getNode("client")!! + val resetClass = classPath.getClassNode("client")!! val resetMethod = resetClass.methods.first { it.name == masterReset.name && it.desc == masterReset.desc }