summaryrefslogtreecommitdiff
path: root/src/cuchaz/enigma/Deobfuscator.java
diff options
context:
space:
mode:
authorGravatar jeff2014-08-21 01:10:37 -0400
committerGravatar jeff2014-08-21 01:10:37 -0400
commit237b2ed2a6b6f537cdbdf9fc9c6d0c7743f34375 (patch)
treeebad059c7fa0bc7723858cb25eed0bb6e95fe42a /src/cuchaz/enigma/Deobfuscator.java
parentfixed recognition of inner class tokens (diff)
downloadenigma-fork-237b2ed2a6b6f537cdbdf9fc9c6d0c7743f34375.tar.gz
enigma-fork-237b2ed2a6b6f537cdbdf9fc9c6d0c7743f34375.tar.xz
enigma-fork-237b2ed2a6b6f537cdbdf9fc9c6d0c7743f34375.zip
fixed call graph searching
added system to navigate multiple tokens for the same entry in a behavior
Diffstat (limited to 'src/cuchaz/enigma/Deobfuscator.java')
-rw-r--r--src/cuchaz/enigma/Deobfuscator.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/cuchaz/enigma/Deobfuscator.java b/src/cuchaz/enigma/Deobfuscator.java
index 34e6033..a5feaa9 100644
--- a/src/cuchaz/enigma/Deobfuscator.java
+++ b/src/cuchaz/enigma/Deobfuscator.java
@@ -181,7 +181,7 @@ public class Deobfuscator
181 return index; 181 return index;
182 } 182 }
183 183
184 public Entry obfuscateEntry( Entry deobfEntry ) 184 public <T extends Entry> T obfuscateEntry( T deobfEntry )
185 { 185 {
186 if( deobfEntry == null ) 186 if( deobfEntry == null )
187 { 187 {
@@ -190,7 +190,7 @@ public class Deobfuscator
190 return getTranslator( TranslationDirection.Obfuscating ).translateEntry( deobfEntry ); 190 return getTranslator( TranslationDirection.Obfuscating ).translateEntry( deobfEntry );
191 } 191 }
192 192
193 public Entry deobfuscateEntry( Entry obfEntry ) 193 public <T extends Entry> T deobfuscateEntry( T obfEntry )
194 { 194 {
195 if( obfEntry == null ) 195 if( obfEntry == null )
196 { 196 {
@@ -199,29 +199,27 @@ public class Deobfuscator
199 return getTranslator( TranslationDirection.Deobfuscating ).translateEntry( obfEntry ); 199 return getTranslator( TranslationDirection.Deobfuscating ).translateEntry( obfEntry );
200 } 200 }
201 201
202 public EntryReference<Entry,Entry> obfuscateReference( EntryReference<Entry,Entry> deobfReference ) 202 public <E extends Entry,C extends Entry> EntryReference<E,C> obfuscateReference( EntryReference<E,C> deobfReference )
203 { 203 {
204 if( deobfReference == null ) 204 if( deobfReference == null )
205 { 205 {
206 return null; 206 return null;
207 } 207 }
208 return new EntryReference<Entry,Entry>( 208 return new EntryReference<E,C>(
209 obfuscateEntry( deobfReference.entry ), 209 obfuscateEntry( deobfReference.entry ),
210 obfuscateEntry( deobfReference.context ), 210 obfuscateEntry( deobfReference.context )
211 deobfReference.pos
212 ); 211 );
213 } 212 }
214 213
215 public EntryReference<Entry,Entry> deobfuscateReference( EntryReference<Entry,Entry> obfReference ) 214 public <E extends Entry,C extends Entry> EntryReference<E,C> deobfuscateReference( EntryReference<E,C> obfReference )
216 { 215 {
217 if( obfReference == null ) 216 if( obfReference == null )
218 { 217 {
219 return null; 218 return null;
220 } 219 }
221 return new EntryReference<Entry,Entry>( 220 return new EntryReference<E,C>(
222 deobfuscateEntry( obfReference.entry ), 221 deobfuscateEntry( obfReference.entry ),
223 deobfuscateEntry( obfReference.context ), 222 deobfuscateEntry( obfReference.context )
224 obfReference.pos
225 ); 223 );
226 } 224 }
227 225