summaryrefslogtreecommitdiff
path: root/src/main/java/cuchaz/enigma/convert/MappingsConverter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cuchaz/enigma/convert/MappingsConverter.java')
-rw-r--r--src/main/java/cuchaz/enigma/convert/MappingsConverter.java582
1 files changed, 582 insertions, 0 deletions
diff --git a/src/main/java/cuchaz/enigma/convert/MappingsConverter.java b/src/main/java/cuchaz/enigma/convert/MappingsConverter.java
new file mode 100644
index 0000000..394b8c8
--- /dev/null
+++ b/src/main/java/cuchaz/enigma/convert/MappingsConverter.java
@@ -0,0 +1,582 @@
1/*******************************************************************************
2 * Copyright (c) 2015 Jeff Martin.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the GNU Lesser General Public
5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html
7 * <p>
8 * Contributors:
9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/
11package cuchaz.enigma.convert;
12
13import com.google.common.collect.*;
14
15import java.util.*;
16import java.util.jar.JarFile;
17
18import cuchaz.enigma.Constants;
19import cuchaz.enigma.Deobfuscator;
20import cuchaz.enigma.analysis.JarIndex;
21import cuchaz.enigma.convert.ClassNamer.SidedClassNamer;
22import cuchaz.enigma.mapping.*;
23
24public class MappingsConverter {
25
26 public static ClassMatches computeClassMatches(JarFile sourceJar, JarFile destJar, Mappings mappings) {
27
28 // index jars
29 System.out.println("Indexing source jar...");
30 JarIndex sourceIndex = new JarIndex();
31 sourceIndex.indexJar(sourceJar, false);
32 System.out.println("Indexing dest jar...");
33 JarIndex destIndex = new JarIndex();
34 destIndex.indexJar(destJar, false);
35
36 // compute the matching
37 ClassMatching matching = computeMatching(sourceJar, sourceIndex, destJar, destIndex, null);
38 return new ClassMatches(matching.matches());
39 }
40
41 public static ClassMatching computeMatching(JarFile sourceJar, JarIndex sourceIndex, JarFile destJar, JarIndex destIndex, BiMap<ClassEntry, ClassEntry> knownMatches) {
42
43 System.out.println("Iteratively matching classes");
44
45 ClassMatching lastMatching = null;
46 int round = 0;
47 SidedClassNamer sourceNamer = null;
48 SidedClassNamer destNamer = null;
49 for (boolean useReferences : Arrays.asList(false, true)) {
50
51 int numUniqueMatchesLastTime = 0;
52 if (lastMatching != null) {
53 numUniqueMatchesLastTime = lastMatching.uniqueMatches().size();
54 }
55
56 while (true) {
57
58 System.out.println("Round " + (++round) + "...");
59
60 // init the matching with identity settings
61 ClassMatching matching = new ClassMatching(
62 new ClassIdentifier(sourceJar, sourceIndex, sourceNamer, useReferences),
63 new ClassIdentifier(destJar, destIndex, destNamer, useReferences)
64 );
65
66 if (knownMatches != null) {
67 matching.addKnownMatches(knownMatches);
68 }
69
70 if (lastMatching == null) {
71 // search all classes
72 matching.match(sourceIndex.getObfClassEntries(), destIndex.getObfClassEntries());
73 } else {
74 // we already know about these matches from last time
75 matching.addKnownMatches(lastMatching.uniqueMatches());
76
77 // search unmatched and ambiguously-matched classes
78 matching.match(lastMatching.unmatchedSourceClasses(), lastMatching.unmatchedDestClasses());
79 for (ClassMatch match : lastMatching.ambiguousMatches()) {
80 matching.match(match.sourceClasses, match.destClasses);
81 }
82 }
83 System.out.println(matching);
84 BiMap<ClassEntry, ClassEntry> uniqueMatches = matching.uniqueMatches();
85
86 // did we match anything new this time?
87 if (uniqueMatches.size() > numUniqueMatchesLastTime) {
88 numUniqueMatchesLastTime = uniqueMatches.size();
89 lastMatching = matching;
90 } else {
91 break;
92 }
93
94 // update the namers
95 ClassNamer namer = new ClassNamer(uniqueMatches);
96 sourceNamer = namer.getSourceNamer();
97 destNamer = namer.getDestNamer();
98 }
99 }
100
101 return lastMatching;
102 }
103
104 public static Mappings newMappings(ClassMatches matches, Mappings oldMappings, Deobfuscator sourceDeobfuscator, Deobfuscator destDeobfuscator) {
105
106 // sort the unique matches by size of inner class chain
107 Multimap<Integer, java.util.Map.Entry<ClassEntry, ClassEntry>> matchesByDestChainSize = HashMultimap.create();
108 for (java.util.Map.Entry<ClassEntry, ClassEntry> match : matches.getUniqueMatches().entrySet()) {
109 int chainSize = destDeobfuscator.getJarIndex().getObfClassChain(match.getValue()).size();
110 matchesByDestChainSize.put(chainSize, match);
111 }
112
113 // build the mappings (in order of small-to-large inner chains)
114 Mappings newMappings = new Mappings();
115 List<Integer> chainSizes = Lists.newArrayList(matchesByDestChainSize.keySet());
116 Collections.sort(chainSizes);
117 for (int chainSize : chainSizes) {
118 for (java.util.Map.Entry<ClassEntry, ClassEntry> match : matchesByDestChainSize.get(chainSize)) {
119
120 // get class info
121 ClassEntry obfSourceClassEntry = match.getKey();
122 ClassEntry obfDestClassEntry = match.getValue();
123 List<ClassEntry> destClassChain = destDeobfuscator.getJarIndex().getObfClassChain(obfDestClassEntry);
124
125 ClassMapping sourceMapping = sourceDeobfuscator.getMappings().getClassByObf(obfSourceClassEntry);
126 if (sourceMapping == null) {
127 // if this class was never deobfuscated, don't try to match it
128 continue;
129 }
130
131 // find out where to make the dest class mapping
132 if (destClassChain.size() == 1) {
133 // not an inner class, add directly to mappings
134 newMappings.addClassMapping(migrateClassMapping(obfDestClassEntry, sourceMapping, matches, false));
135 } else {
136 // inner class, find the outer class mapping
137 ClassMapping destMapping = null;
138 for (int i = 0; i < destClassChain.size() - 1; i++) {
139 ClassEntry destChainClassEntry = destClassChain.get(i);
140 if (destMapping == null) {
141 destMapping = newMappings.getClassByObf(destChainClassEntry);
142 if (destMapping == null) {
143 destMapping = new ClassMapping(destChainClassEntry.getName());
144 newMappings.addClassMapping(destMapping);
145 }
146 } else {
147 destMapping = destMapping.getInnerClassByObfSimple(destChainClassEntry.getInnermostClassName());
148 if (destMapping == null) {
149 destMapping = new ClassMapping(destChainClassEntry.getName());
150 destMapping.addInnerClassMapping(destMapping);
151 }
152 }
153 }
154 destMapping.addInnerClassMapping(migrateClassMapping(obfDestClassEntry, sourceMapping, matches, true));
155 }
156 }
157 }
158 return newMappings;
159 }
160
161 private static ClassMapping migrateClassMapping(ClassEntry newObfClass, ClassMapping oldClassMapping, final ClassMatches matches, boolean useSimpleName) {
162
163 ClassNameReplacer replacer = new ClassNameReplacer() {
164 @Override
165 public String replace(String className) {
166 ClassEntry newClassEntry = matches.getUniqueMatches().get(new ClassEntry(className));
167 if (newClassEntry != null) {
168 return newClassEntry.getName();
169 }
170 return null;
171 }
172 };
173
174 ClassMapping newClassMapping;
175 String deobfName = oldClassMapping.getDeobfName();
176 if (deobfName != null) {
177 if (useSimpleName) {
178 deobfName = new ClassEntry(deobfName).getSimpleName();
179 }
180 newClassMapping = new ClassMapping(newObfClass.getName(), deobfName);
181 } else {
182 newClassMapping = new ClassMapping(newObfClass.getName());
183 }
184
185 // migrate fields
186 for (FieldMapping oldFieldMapping : oldClassMapping.fields()) {
187 if (canMigrate(oldFieldMapping.getObfType(), matches)) {
188 newClassMapping.addFieldMapping(new FieldMapping(oldFieldMapping, replacer));
189 } else {
190 System.out.println(String.format("Can't map field, dropping: %s.%s %s",
191 oldClassMapping.getDeobfName(),
192 oldFieldMapping.getDeobfName(),
193 oldFieldMapping.getObfType()
194 ));
195 }
196 }
197
198 // migrate methods
199 for (MethodMapping oldMethodMapping : oldClassMapping.methods()) {
200 if (canMigrate(oldMethodMapping.getObfSignature(), matches)) {
201 newClassMapping.addMethodMapping(new MethodMapping(oldMethodMapping, replacer));
202 } else {
203 System.out.println(String.format("Can't map method, dropping: %s.%s %s",
204 oldClassMapping.getDeobfName(),
205 oldMethodMapping.getDeobfName(),
206 oldMethodMapping.getObfSignature()
207 ));
208 }
209 }
210
211 return newClassMapping;
212 }
213
214 private static boolean canMigrate(Signature oldObfSignature, ClassMatches classMatches) {
215 for (Type oldObfType : oldObfSignature.types()) {
216 if (!canMigrate(oldObfType, classMatches)) {
217 return false;
218 }
219 }
220 return true;
221 }
222
223 private static boolean canMigrate(Type oldObfType, ClassMatches classMatches) {
224
225 // non classes can be migrated
226 if (!oldObfType.hasClass()) {
227 return true;
228 }
229
230 // non obfuscated classes can be migrated
231 ClassEntry classEntry = oldObfType.getClassEntry();
232 if (!classEntry.getPackageName().equals(Constants.NonePackage)) {
233 return true;
234 }
235
236 // obfuscated classes with mappings can be migrated
237 return classMatches.getUniqueMatches().containsKey(classEntry);
238 }
239
240 public static void convertMappings(Mappings mappings, BiMap<ClassEntry, ClassEntry> changes) {
241
242 // sort the changes so classes are renamed in the correct order
243 // ie. if we have the mappings a->b, b->c, we have to apply b->c before a->b
244 LinkedHashMap<ClassEntry, ClassEntry> sortedChanges = Maps.newLinkedHashMap();
245 int numChangesLeft = changes.size();
246 while (!changes.isEmpty()) {
247 Iterator<Map.Entry<ClassEntry, ClassEntry>> iter = changes.entrySet().iterator();
248 while (iter.hasNext()) {
249 Map.Entry<ClassEntry, ClassEntry> change = iter.next();
250 if (changes.containsKey(change.getValue())) {
251 sortedChanges.put(change.getKey(), change.getValue());
252 iter.remove();
253 }
254 }
255
256 // did we remove any changes?
257 if (numChangesLeft - changes.size() > 0) {
258 // keep going
259 numChangesLeft = changes.size();
260 } else {
261 // can't sort anymore. There must be a loop
262 break;
263 }
264 }
265 if (!changes.isEmpty()) {
266 throw new Error("Unable to sort class changes! There must be a cycle.");
267 }
268
269 // convert the mappings in the correct class order
270 for (Map.Entry<ClassEntry, ClassEntry> entry : sortedChanges.entrySet()) {
271 mappings.renameObfClass(entry.getKey().getName(), entry.getValue().getName());
272 }
273 }
274
275 public interface Doer<T extends Entry> {
276 Collection<T> getDroppedEntries(MappingsChecker checker);
277
278 Collection<T> getObfEntries(JarIndex jarIndex);
279
280 Collection<? extends MemberMapping<T>> getMappings(ClassMapping destClassMapping);
281
282 Set<T> filterEntries(Collection<T> obfEntries, T obfSourceEntry, ClassMatches classMatches);
283
284 void setUpdateObfMember(ClassMapping classMapping, MemberMapping<T> memberMapping, T newEntry);
285
286 boolean hasObfMember(ClassMapping classMapping, T obfEntry);
287
288 void removeMemberByObf(ClassMapping classMapping, T obfEntry);
289 }
290
291 public static Doer<FieldEntry> getFieldDoer() {
292 return new Doer<FieldEntry>() {
293
294 @Override
295 public Collection<FieldEntry> getDroppedEntries(MappingsChecker checker) {
296 return checker.getDroppedFieldMappings().keySet();
297 }
298
299 @Override
300 public Collection<FieldEntry> getObfEntries(JarIndex jarIndex) {
301 return jarIndex.getObfFieldEntries();
302 }
303
304 @Override
305 public Collection<? extends MemberMapping<FieldEntry>> getMappings(ClassMapping destClassMapping) {
306 return (Collection<? extends MemberMapping<FieldEntry>>) destClassMapping.fields();
307 }
308
309 @Override
310 public Set<FieldEntry> filterEntries(Collection<FieldEntry> obfDestFields, FieldEntry obfSourceField, ClassMatches classMatches) {
311 Set<FieldEntry> out = Sets.newHashSet();
312 for (FieldEntry obfDestField : obfDestFields) {
313 Type translatedDestType = translate(obfDestField.getType(), classMatches.getUniqueMatches().inverse());
314 if (translatedDestType.equals(obfSourceField.getType())) {
315 out.add(obfDestField);
316 }
317 }
318 return out;
319 }
320
321 @Override
322 public void setUpdateObfMember(ClassMapping classMapping, MemberMapping<FieldEntry> memberMapping, FieldEntry newField) {
323 FieldMapping fieldMapping = (FieldMapping) memberMapping;
324 classMapping.setFieldObfNameAndType(fieldMapping.getObfName(), fieldMapping.getObfType(), newField.getName(), newField.getType());
325 }
326
327 @Override
328 public boolean hasObfMember(ClassMapping classMapping, FieldEntry obfField) {
329 return classMapping.getFieldByObf(obfField.getName(), obfField.getType()) != null;
330 }
331
332 @Override
333 public void removeMemberByObf(ClassMapping classMapping, FieldEntry obfField) {
334 classMapping.removeFieldMapping(classMapping.getFieldByObf(obfField.getName(), obfField.getType()));
335 }
336 };
337 }
338
339 public static Doer<BehaviorEntry> getMethodDoer() {
340 return new Doer<BehaviorEntry>() {
341
342 @Override
343 public Collection<BehaviorEntry> getDroppedEntries(MappingsChecker checker) {
344 return checker.getDroppedMethodMappings().keySet();
345 }
346
347 @Override
348 public Collection<BehaviorEntry> getObfEntries(JarIndex jarIndex) {
349 return jarIndex.getObfBehaviorEntries();
350 }
351
352 @Override
353 public Collection<? extends MemberMapping<BehaviorEntry>> getMappings(ClassMapping destClassMapping) {
354 return (Collection<? extends MemberMapping<BehaviorEntry>>) destClassMapping.methods();
355 }
356
357 @Override
358 public Set<BehaviorEntry> filterEntries(Collection<BehaviorEntry> obfDestFields, BehaviorEntry obfSourceField, ClassMatches classMatches) {
359 Set<BehaviorEntry> out = Sets.newHashSet();
360 for (BehaviorEntry obfDestField : obfDestFields) {
361 Signature translatedDestSignature = translate(obfDestField.getSignature(), classMatches.getUniqueMatches().inverse());
362 if (translatedDestSignature == null && obfSourceField.getSignature() == null) {
363 out.add(obfDestField);
364 } else if (translatedDestSignature == null || obfSourceField.getSignature() == null) {
365 // skip it
366 } else if (translatedDestSignature.equals(obfSourceField.getSignature())) {
367 out.add(obfDestField);
368 }
369 }
370 return out;
371 }
372
373 @Override
374 public void setUpdateObfMember(ClassMapping classMapping, MemberMapping<BehaviorEntry> memberMapping, BehaviorEntry newBehavior) {
375 MethodMapping methodMapping = (MethodMapping) memberMapping;
376 classMapping.setMethodObfNameAndSignature(methodMapping.getObfName(), methodMapping.getObfSignature(), newBehavior.getName(), newBehavior.getSignature());
377 }
378
379 @Override
380 public boolean hasObfMember(ClassMapping classMapping, BehaviorEntry obfBehavior) {
381 return classMapping.getMethodByObf(obfBehavior.getName(), obfBehavior.getSignature()) != null;
382 }
383
384 @Override
385 public void removeMemberByObf(ClassMapping classMapping, BehaviorEntry obfBehavior) {
386 classMapping.removeMethodMapping(classMapping.getMethodByObf(obfBehavior.getName(), obfBehavior.getSignature()));
387 }
388 };
389 }
390
391 public static <T extends Entry> MemberMatches<T> computeMemberMatches(Deobfuscator destDeobfuscator, Mappings destMappings, ClassMatches classMatches, Doer<T> doer) {
392
393 MemberMatches<T> memberMatches = new MemberMatches<T>();
394
395 // unmatched source fields are easy
396 MappingsChecker checker = new MappingsChecker(destDeobfuscator.getJarIndex());
397 checker.dropBrokenMappings(destMappings);
398 for (T destObfEntry : doer.getDroppedEntries(checker)) {
399 T srcObfEntry = translate(destObfEntry, classMatches.getUniqueMatches().inverse());
400 memberMatches.addUnmatchedSourceEntry(srcObfEntry);
401 }
402
403 // get matched fields (anything that's left after the checks/drops is matched(
404 for (ClassMapping classMapping : destMappings.classes()) {
405 collectMatchedFields(memberMatches, classMapping, classMatches, doer);
406 }
407
408 // get unmatched dest fields
409 for (T destEntry : doer.getObfEntries(destDeobfuscator.getJarIndex())) {
410 if (!memberMatches.isMatchedDestEntry(destEntry)) {
411 memberMatches.addUnmatchedDestEntry(destEntry);
412 }
413 }
414
415 System.out.println("Automatching " + memberMatches.getUnmatchedSourceEntries().size() + " unmatched source entries...");
416
417 // go through the unmatched source fields and try to pick out the easy matches
418 for (ClassEntry obfSourceClass : Lists.newArrayList(memberMatches.getSourceClassesWithUnmatchedEntries())) {
419 for (T obfSourceEntry : Lists.newArrayList(memberMatches.getUnmatchedSourceEntries(obfSourceClass))) {
420
421 // get the possible dest matches
422 ClassEntry obfDestClass = classMatches.getUniqueMatches().get(obfSourceClass);
423
424 // filter by type/signature
425 Set<T> obfDestEntries = doer.filterEntries(memberMatches.getUnmatchedDestEntries(obfDestClass), obfSourceEntry, classMatches);
426
427 if (obfDestEntries.size() == 1) {
428 // make the easy match
429 memberMatches.makeMatch(obfSourceEntry, obfDestEntries.iterator().next());
430 } else if (obfDestEntries.isEmpty()) {
431 // no match is possible =(
432 memberMatches.makeSourceUnmatchable(obfSourceEntry);
433 }
434 }
435 }
436
437 System.out.println(String.format("Ended up with %d ambiguous and %d unmatchable source entries",
438 memberMatches.getUnmatchedSourceEntries().size(),
439 memberMatches.getUnmatchableSourceEntries().size()
440 ));
441
442 return memberMatches;
443 }
444
445 private static <T extends Entry> void collectMatchedFields(MemberMatches<T> memberMatches, ClassMapping destClassMapping, ClassMatches classMatches, Doer<T> doer) {
446
447 // get the fields for this class
448 for (MemberMapping<T> destEntryMapping : doer.getMappings(destClassMapping)) {
449 T destObfField = destEntryMapping.getObfEntry(destClassMapping.getObfEntry());
450 T srcObfField = translate(destObfField, classMatches.getUniqueMatches().inverse());
451 memberMatches.addMatch(srcObfField, destObfField);
452 }
453
454 // recurse
455 for (ClassMapping destInnerClassMapping : destClassMapping.innerClasses()) {
456 collectMatchedFields(memberMatches, destInnerClassMapping, classMatches, doer);
457 }
458 }
459
460 @SuppressWarnings("unchecked")
461 private static <T extends Entry> T translate(T in, BiMap<ClassEntry, ClassEntry> map) {
462 if (in instanceof FieldEntry) {
463 return (T) new FieldEntry(
464 map.get(in.getClassEntry()),
465 in.getName(),
466 translate(((FieldEntry) in).getType(), map)
467 );
468 } else if (in instanceof MethodEntry) {
469 return (T) new MethodEntry(
470 map.get(in.getClassEntry()),
471 in.getName(),
472 translate(((MethodEntry) in).getSignature(), map)
473 );
474 } else if (in instanceof ConstructorEntry) {
475 return (T) new ConstructorEntry(
476 map.get(in.getClassEntry()),
477 translate(((ConstructorEntry) in).getSignature(), map)
478 );
479 }
480 throw new Error("Unhandled entry type: " + in.getClass());
481 }
482
483 private static Type translate(Type type, final BiMap<ClassEntry, ClassEntry> map) {
484 return new Type(type, new ClassNameReplacer() {
485 @Override
486 public String replace(String inClassName) {
487 ClassEntry outClassEntry = map.get(new ClassEntry(inClassName));
488 if (outClassEntry == null) {
489 return null;
490 }
491 return outClassEntry.getName();
492 }
493 });
494 }
495
496 private static Signature translate(Signature signature, final BiMap<ClassEntry, ClassEntry> map) {
497 if (signature == null) {
498 return null;
499 }
500 return new Signature(signature, new ClassNameReplacer() {
501 @Override
502 public String replace(String inClassName) {
503 ClassEntry outClassEntry = map.get(new ClassEntry(inClassName));
504 if (outClassEntry == null) {
505 return null;
506 }
507 return outClassEntry.getName();
508 }
509 });
510 }
511
512 public static <T extends Entry> void applyMemberMatches(Mappings mappings, ClassMatches classMatches, MemberMatches<T> memberMatches, Doer<T> doer) {
513 for (ClassMapping classMapping : mappings.classes()) {
514 applyMemberMatches(classMapping, classMatches, memberMatches, doer);
515 }
516 }
517
518 private static <T extends Entry> void applyMemberMatches(ClassMapping classMapping, ClassMatches classMatches, MemberMatches<T> memberMatches, Doer<T> doer) {
519
520 // get the classes
521 ClassEntry obfDestClass = classMapping.getObfEntry();
522
523 // make a map of all the renames we need to make
524 Map<T, T> renames = Maps.newHashMap();
525 for (MemberMapping<T> memberMapping : Lists.newArrayList(doer.getMappings(classMapping))) {
526 T obfOldDestEntry = memberMapping.getObfEntry(obfDestClass);
527 T obfSourceEntry = getSourceEntryFromDestMapping(memberMapping, obfDestClass, classMatches);
528
529 // but drop the unmatchable things
530 if (memberMatches.isUnmatchableSourceEntry(obfSourceEntry)) {
531 doer.removeMemberByObf(classMapping, obfOldDestEntry);
532 continue;
533 }
534
535 T obfNewDestEntry = memberMatches.matches().get(obfSourceEntry);
536 if (obfNewDestEntry != null && !obfOldDestEntry.getName().equals(obfNewDestEntry.getName())) {
537 renames.put(obfOldDestEntry, obfNewDestEntry);
538 }
539 }
540
541 if (!renames.isEmpty()) {
542
543 // apply to this class (should never need more than n passes)
544 int numRenamesAppliedThisRound;
545 do {
546 numRenamesAppliedThisRound = 0;
547
548 for (MemberMapping<T> memberMapping : Lists.newArrayList(doer.getMappings(classMapping))) {
549 T obfOldDestEntry = memberMapping.getObfEntry(obfDestClass);
550 T obfNewDestEntry = renames.get(obfOldDestEntry);
551 if (obfNewDestEntry != null) {
552 // make sure this rename won't cause a collision
553 // otherwise, save it for the next round and try again next time
554 if (!doer.hasObfMember(classMapping, obfNewDestEntry)) {
555 doer.setUpdateObfMember(classMapping, memberMapping, obfNewDestEntry);
556 renames.remove(obfOldDestEntry);
557 numRenamesAppliedThisRound++;
558 }
559 }
560 }
561 } while (numRenamesAppliedThisRound > 0);
562
563 if (!renames.isEmpty()) {
564 System.err.println(String.format("WARNING: Couldn't apply all the renames for class %s. %d renames left.",
565 classMapping.getObfFullName(), renames.size()
566 ));
567 for (Map.Entry<T, T> entry : renames.entrySet()) {
568 System.err.println(String.format("\t%s -> %s", entry.getKey().getName(), entry.getValue().getName()));
569 }
570 }
571 }
572
573 // recurse
574 for (ClassMapping innerClassMapping : classMapping.innerClasses()) {
575 applyMemberMatches(innerClassMapping, classMatches, memberMatches, doer);
576 }
577 }
578
579 private static <T extends Entry> T getSourceEntryFromDestMapping(MemberMapping<T> destMemberMapping, ClassEntry obfDestClass, ClassMatches classMatches) {
580 return translate(destMemberMapping.getObfEntry(obfDestClass), classMatches.getUniqueMatches().inverse());
581 }
582}