diff options
| -rw-r--r-- | src/main/java/cuchaz/enigma/translation/representation/entry/ClassEntry.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/cuchaz/enigma/translation/representation/entry/ClassEntry.java b/src/main/java/cuchaz/enigma/translation/representation/entry/ClassEntry.java index 9bfcd8a..6bf4f96 100644 --- a/src/main/java/cuchaz/enigma/translation/representation/entry/ClassEntry.java +++ b/src/main/java/cuchaz/enigma/translation/representation/entry/ClassEntry.java | |||
| @@ -16,6 +16,7 @@ import cuchaz.enigma.throwables.IllegalNameException; | |||
| 16 | import cuchaz.enigma.translation.Translator; | 16 | import cuchaz.enigma.translation.Translator; |
| 17 | import cuchaz.enigma.translation.mapping.EntryMapping; | 17 | import cuchaz.enigma.translation.mapping.EntryMapping; |
| 18 | import cuchaz.enigma.translation.mapping.NameValidator; | 18 | import cuchaz.enigma.translation.mapping.NameValidator; |
| 19 | import cuchaz.enigma.translation.representation.TypeDescriptor; | ||
| 19 | 20 | ||
| 20 | import javax.annotation.Nonnull; | 21 | import javax.annotation.Nonnull; |
| 21 | import javax.annotation.Nullable; | 22 | import javax.annotation.Nullable; |
| @@ -62,6 +63,11 @@ public class ClassEntry extends ParentedEntry<ClassEntry> implements Comparable< | |||
| 62 | 63 | ||
| 63 | @Override | 64 | @Override |
| 64 | public ClassEntry translate(Translator translator, @Nullable EntryMapping mapping) { | 65 | public ClassEntry translate(Translator translator, @Nullable EntryMapping mapping) { |
| 66 | if (name.charAt(0) == '[') { | ||
| 67 | String translatedName = translator.translate(new TypeDescriptor(name)).toString(); | ||
| 68 | return new ClassEntry(parent, translatedName); | ||
| 69 | } | ||
| 70 | |||
| 65 | String translatedName = mapping != null ? mapping.getTargetName() : name; | 71 | String translatedName = mapping != null ? mapping.getTargetName() : name; |
| 66 | return new ClassEntry(parent, translatedName); | 72 | return new ClassEntry(parent, translatedName); |
| 67 | } | 73 | } |