Browse Source

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>
pull/84/head
Graham 2 years ago
parent
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

2
deob-annotations/src/main/java/dev/openrs2/deob/annotation/OriginalMember.java

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

2
deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.kt

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

Loading…
Cancel
Save