diff options
| author | 2014-08-11 23:18:10 -0400 | |
|---|---|---|
| committer | 2014-08-11 23:18:10 -0400 | |
| commit | 603245ee6218668eb8eb39e63ecedce257b3ef35 (patch) | |
| tree | 80cc294f793758ed4509187c58b86d96f5b62473 /src/cuchaz/enigma/mapping/Renamer.java | |
| parent | added method inheritance browsing (diff) | |
| download | enigma-fork-603245ee6218668eb8eb39e63ecedce257b3ef35.tar.gz enigma-fork-603245ee6218668eb8eb39e63ecedce257b3ef35.tar.xz enigma-fork-603245ee6218668eb8eb39e63ecedce257b3ef35.zip | |
refactor Ancestries into Ancestries and JarIndex
Diffstat (limited to 'src/cuchaz/enigma/mapping/Renamer.java')
| -rw-r--r-- | src/cuchaz/enigma/mapping/Renamer.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cuchaz/enigma/mapping/Renamer.java b/src/cuchaz/enigma/mapping/Renamer.java index 5a75c01..d372575 100644 --- a/src/cuchaz/enigma/mapping/Renamer.java +++ b/src/cuchaz/enigma/mapping/Renamer.java | |||
| @@ -15,17 +15,17 @@ import java.io.ObjectOutputStream; | |||
| 15 | import java.io.OutputStream; | 15 | import java.io.OutputStream; |
| 16 | import java.util.zip.GZIPOutputStream; | 16 | import java.util.zip.GZIPOutputStream; |
| 17 | 17 | ||
| 18 | import cuchaz.enigma.analysis.Ancestries; | 18 | import cuchaz.enigma.analysis.JarIndex; |
| 19 | import cuchaz.enigma.analysis.MethodInheritanceTreeNode; | 19 | import cuchaz.enigma.analysis.MethodInheritanceTreeNode; |
| 20 | 20 | ||
| 21 | public class Renamer | 21 | public class Renamer |
| 22 | { | 22 | { |
| 23 | private Ancestries m_ancestries; | 23 | private JarIndex m_index; |
| 24 | private Mappings m_mappings; | 24 | private Mappings m_mappings; |
| 25 | 25 | ||
| 26 | public Renamer( Ancestries ancestries, Mappings mappings ) | 26 | public Renamer( JarIndex index, Mappings mappings ) |
| 27 | { | 27 | { |
| 28 | m_ancestries = ancestries; | 28 | m_index = index; |
| 29 | m_mappings = mappings; | 29 | m_mappings = mappings; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| @@ -61,7 +61,7 @@ public class Renamer | |||
| 61 | { | 61 | { |
| 62 | // get the method tree | 62 | // get the method tree |
| 63 | setMethodTreeName( | 63 | setMethodTreeName( |
| 64 | m_ancestries.getMethodInheritance( m_mappings.getTranslator( m_ancestries, TranslationDirection.Deobfuscating ), obf ), | 64 | m_index.getMethodInheritance( m_mappings.getTranslator( m_index.getAncestries(), TranslationDirection.Deobfuscating ), obf ), |
| 65 | deobfName | 65 | deobfName |
| 66 | ); | 66 | ); |
| 67 | } | 67 | } |
| @@ -90,7 +90,7 @@ public class Renamer | |||
| 90 | classMapping = createClassMapping( obf.getClassEntry() ); | 90 | classMapping = createClassMapping( obf.getClassEntry() ); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | String deobfSignature = m_mappings.getTranslator( m_ancestries, TranslationDirection.Deobfuscating ).translateSignature( obf.getSignature() ); | 93 | String deobfSignature = m_mappings.getTranslator( m_index.getAncestries(), TranslationDirection.Deobfuscating ).translateSignature( obf.getSignature() ); |
| 94 | classMapping.setMethodNameAndSignature( obf.getName(), obf.getSignature(), deobfName, deobfSignature ); | 94 | classMapping.setMethodNameAndSignature( obf.getName(), obf.getSignature(), deobfName, deobfSignature ); |
| 95 | 95 | ||
| 96 | // TODO: update ancestor/descendant methods in other classes in the inheritance hierarchy too | 96 | // TODO: update ancestor/descendant methods in other classes in the inheritance hierarchy too |
| @@ -129,7 +129,7 @@ public class Renamer | |||
| 129 | 129 | ||
| 130 | private void updateDeobfMethodSignatures( ) | 130 | private void updateDeobfMethodSignatures( ) |
| 131 | { | 131 | { |
| 132 | Translator translator = m_mappings.getTranslator( m_ancestries, TranslationDirection.Deobfuscating ); | 132 | Translator translator = m_mappings.getTranslator( m_index.getAncestries(), TranslationDirection.Deobfuscating ); |
| 133 | for( ClassMapping classMapping : m_mappings.m_classesByObf.values() ) | 133 | for( ClassMapping classMapping : m_mappings.m_classesByObf.values() ) |
| 134 | { | 134 | { |
| 135 | classMapping.updateDeobfMethodSignatures( translator ); | 135 | classMapping.updateDeobfMethodSignatures( translator ); |