Track original constructor names and arguments too

While it isn't useful for retaining the name of the constructor itself,
as they don't really have names, it will be useful for tracking argument
names and positions.

Signed-off-by: Graham <gpe@openrs2.dev>
feat/deob-ir
Graham 5 years ago
parent 488e8ef8c3
commit 51890c56b3
  1. 2
      deob-annotations/src/main/java/dev/openrs2/deob/annotation/OriginalMember.java
  2. 2
      deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.kt

@ -3,7 +3,7 @@ package dev.openrs2.deob.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Target; import java.lang.annotation.Target;
@Target({ ElementType.FIELD, ElementType.METHOD }) @Target({ ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD })
public @interface OriginalMember { public @interface OriginalMember {
String owner(); String owner();
String name(); String name();

@ -40,7 +40,7 @@ class OriginalNameTransformer : Transformer() {
clazz: ClassNode, clazz: ClassNode,
method: MethodNode method: MethodNode
): Boolean { ): Boolean {
if (method.name == "<init>" || method.name == "<clinit>") { if (method.name == "<clinit>") {
return false return false
} }

Loading…
Cancel
Save