diff options
Diffstat (limited to 'src/cuchaz/enigma/mapping/Translator.java')
| -rw-r--r-- | src/cuchaz/enigma/mapping/Translator.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cuchaz/enigma/mapping/Translator.java b/src/cuchaz/enigma/mapping/Translator.java index bae0dce..3dbc103 100644 --- a/src/cuchaz/enigma/mapping/Translator.java +++ b/src/cuchaz/enigma/mapping/Translator.java | |||
| @@ -19,10 +19,10 @@ import cuchaz.enigma.mapping.SignatureUpdater.ClassNameUpdater; | |||
| 19 | public class Translator | 19 | public class Translator |
| 20 | { | 20 | { |
| 21 | private TranslationDirection m_direction; | 21 | private TranslationDirection m_direction; |
| 22 | private Map<String,ClassIndex> m_classes; | 22 | private Map<String,ClassMapping> m_classes; |
| 23 | private Ancestries m_ancestries; | 23 | private Ancestries m_ancestries; |
| 24 | 24 | ||
| 25 | protected Translator( TranslationDirection direction, Map<String,ClassIndex> classes, Ancestries ancestries ) | 25 | protected Translator( TranslationDirection direction, Map<String,ClassMapping> classes, Ancestries ancestries ) |
| 26 | { | 26 | { |
| 27 | m_direction = direction; | 27 | m_direction = direction; |
| 28 | m_classes = classes; | 28 | m_classes = classes; |
| @@ -36,7 +36,7 @@ public class Translator | |||
| 36 | 36 | ||
| 37 | public String translateClass( String in ) | 37 | public String translateClass( String in ) |
| 38 | { | 38 | { |
| 39 | ClassIndex classIndex = m_classes.get( in ); | 39 | ClassMapping classIndex = m_classes.get( in ); |
| 40 | if( classIndex != null ) | 40 | if( classIndex != null ) |
| 41 | { | 41 | { |
| 42 | return m_direction.choose( | 42 | return m_direction.choose( |
| @@ -63,7 +63,7 @@ public class Translator | |||
| 63 | for( String className : getSelfAndAncestors( in.getClassName() ) ) | 63 | for( String className : getSelfAndAncestors( in.getClassName() ) ) |
| 64 | { | 64 | { |
| 65 | // look for the class | 65 | // look for the class |
| 66 | ClassIndex classIndex = m_classes.get( className ); | 66 | ClassMapping classIndex = m_classes.get( className ); |
| 67 | if( classIndex != null ) | 67 | if( classIndex != null ) |
| 68 | { | 68 | { |
| 69 | // look for the field | 69 | // look for the field |
| @@ -99,11 +99,11 @@ public class Translator | |||
| 99 | for( String className : getSelfAndAncestors( in.getClassName() ) ) | 99 | for( String className : getSelfAndAncestors( in.getClassName() ) ) |
| 100 | { | 100 | { |
| 101 | // look for the class | 101 | // look for the class |
| 102 | ClassIndex classIndex = m_classes.get( className ); | 102 | ClassMapping classIndex = m_classes.get( className ); |
| 103 | if( classIndex != null ) | 103 | if( classIndex != null ) |
| 104 | { | 104 | { |
| 105 | // look for the method | 105 | // look for the method |
| 106 | MethodIndex methodIndex = m_direction.choose( | 106 | MethodMapping methodIndex = m_direction.choose( |
| 107 | classIndex.getMethodByObf( in.getName(), in.getSignature() ), | 107 | classIndex.getMethodByObf( in.getName(), in.getSignature() ), |
| 108 | classIndex.getMethodByDeobf( in.getName(), in.getSignature() ) | 108 | classIndex.getMethodByDeobf( in.getName(), in.getSignature() ) |
| 109 | ); | 109 | ); |
| @@ -139,11 +139,11 @@ public class Translator | |||
| 139 | for( String className : getSelfAndAncestors( in.getClassName() ) ) | 139 | for( String className : getSelfAndAncestors( in.getClassName() ) ) |
| 140 | { | 140 | { |
| 141 | // look for the class | 141 | // look for the class |
| 142 | ClassIndex classIndex = m_classes.get( className ); | 142 | ClassMapping classIndex = m_classes.get( className ); |
| 143 | if( classIndex != null ) | 143 | if( classIndex != null ) |
| 144 | { | 144 | { |
| 145 | // look for the method | 145 | // look for the method |
| 146 | MethodIndex methodIndex = m_direction.choose( | 146 | MethodMapping methodIndex = m_direction.choose( |
| 147 | classIndex.getMethodByObf( in.getMethodName(), in.getMethodSignature() ), | 147 | classIndex.getMethodByObf( in.getMethodName(), in.getMethodSignature() ), |
| 148 | classIndex.getMethodByDeobf( in.getMethodName(), in.getMethodSignature() ) | 148 | classIndex.getMethodByDeobf( in.getMethodName(), in.getMethodSignature() ) |
| 149 | ); | 149 | ); |