diff options
| -rw-r--r-- | enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationSignatureVisitor.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationSignatureVisitor.java b/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationSignatureVisitor.java index bc4a2f0..6cab22c 100644 --- a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationSignatureVisitor.java +++ b/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationSignatureVisitor.java | |||
| @@ -1,11 +1,12 @@ | |||
| 1 | package cuchaz.enigma.bytecode.translators; | 1 | package cuchaz.enigma.bytecode.translators; |
| 2 | 2 | ||
| 3 | import cuchaz.enigma.Enigma; | ||
| 4 | import org.objectweb.asm.signature.SignatureVisitor; | ||
| 5 | |||
| 6 | import java.util.Stack; | 3 | import java.util.Stack; |
| 7 | import java.util.function.Function; | 4 | import java.util.function.Function; |
| 8 | 5 | ||
| 6 | import org.objectweb.asm.signature.SignatureVisitor; | ||
| 7 | |||
| 8 | import cuchaz.enigma.Enigma; | ||
| 9 | |||
| 9 | public class TranslationSignatureVisitor extends SignatureVisitor { | 10 | public class TranslationSignatureVisitor extends SignatureVisitor { |
| 10 | private final Function<String, String> remapper; | 11 | private final Function<String, String> remapper; |
| 11 | 12 | ||
| @@ -31,6 +32,7 @@ public class TranslationSignatureVisitor extends SignatureVisitor { | |||
| 31 | if (!name.startsWith(lastClass+"$")){//todo see if there's a way to base this on whether there were type params or not | 32 | if (!name.startsWith(lastClass+"$")){//todo see if there's a way to base this on whether there were type params or not |
| 32 | name = lastClass+"$"+name; | 33 | name = lastClass+"$"+name; |
| 33 | } | 34 | } |
| 35 | classStack.push(name); | ||
| 34 | String translatedEntry = this.remapper.apply(name); | 36 | String translatedEntry = this.remapper.apply(name); |
| 35 | if (translatedEntry.contains("/")){ | 37 | if (translatedEntry.contains("/")){ |
| 36 | translatedEntry = translatedEntry.substring(translatedEntry.lastIndexOf("/")+1); | 38 | translatedEntry = translatedEntry.substring(translatedEntry.lastIndexOf("/")+1); |