Rename getNode() to getClassNode()

Signed-off-by: Graham <gpe@openrs2.dev>
bzip2
Graham 5 years ago
parent ff96cf70a2
commit 49a90c1cf5
  1. 2
      asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt
  2. 2
      deob/src/main/java/dev/openrs2/deob/transform/ConstantArgTransformer.kt
  3. 2
      deob/src/main/java/dev/openrs2/deob/transform/CounterTransformer.kt
  4. 2
      deob/src/main/java/dev/openrs2/deob/transform/ResetTransformer.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) {

@ -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

@ -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)
}

@ -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
}

Loading…
Cancel
Save