summaryrefslogtreecommitdiff
path: root/src/cuchaz/enigma/Deobfuscator.java
diff options
context:
space:
mode:
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