diff options
| author | 2015-03-09 20:08:15 -0400 | |
|---|---|---|
| committer | 2015-03-09 20:08:15 -0400 | |
| commit | 1ad33bfe0a96b1b4a1f3c02cf2c054e8a101dfd8 (patch) | |
| tree | 86ce734a5bb32a7b205c096118faf41996521a43 /src/cuchaz/enigma/mapping | |
| parent | starting on field matching gui (diff) | |
| download | enigma-fork-1ad33bfe0a96b1b4a1f3c02cf2c054e8a101dfd8.tar.gz enigma-fork-1ad33bfe0a96b1b4a1f3c02cf2c054e8a101dfd8.tar.xz enigma-fork-1ad33bfe0a96b1b4a1f3c02cf2c054e8a101dfd8.zip | |
field matcher is starting to be useful
Diffstat (limited to 'src/cuchaz/enigma/mapping')
| -rw-r--r-- | src/cuchaz/enigma/mapping/EntryFactory.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cuchaz/enigma/mapping/EntryFactory.java b/src/cuchaz/enigma/mapping/EntryFactory.java index f4d62c8..333bb09 100644 --- a/src/cuchaz/enigma/mapping/EntryFactory.java +++ b/src/cuchaz/enigma/mapping/EntryFactory.java | |||
| @@ -26,6 +26,10 @@ public class EntryFactory { | |||
| 26 | return obfClassEntry.buildClassEntry(jarIndex.getObfClassChain(obfClassEntry)); | 26 | return obfClassEntry.buildClassEntry(jarIndex.getObfClassChain(obfClassEntry)); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | private static ClassEntry getObfClassEntry(ClassMapping classMapping) { | ||
| 30 | return new ClassEntry(classMapping.getObfFullName()); | ||
| 31 | } | ||
| 32 | |||
| 29 | public static ClassEntry getDeobfClassEntry(ClassMapping classMapping) { | 33 | public static ClassEntry getDeobfClassEntry(ClassMapping classMapping) { |
| 30 | return new ClassEntry(classMapping.getDeobfName()); | 34 | return new ClassEntry(classMapping.getDeobfName()); |
| 31 | } | 35 | } |
| @@ -50,6 +54,14 @@ public class EntryFactory { | |||
| 50 | ); | 54 | ); |
| 51 | } | 55 | } |
| 52 | 56 | ||
| 57 | public static FieldEntry getObfFieldEntry(ClassMapping classMapping, FieldMapping fieldMapping) { | ||
| 58 | return new FieldEntry( | ||
| 59 | getObfClassEntry(classMapping), | ||
| 60 | fieldMapping.getObfName(), | ||
| 61 | fieldMapping.getObfType() | ||
| 62 | ); | ||
| 63 | } | ||
| 64 | |||
| 53 | public static MethodEntry getMethodEntry(CtMethod method) { | 65 | public static MethodEntry getMethodEntry(CtMethod method) { |
| 54 | return new MethodEntry( | 66 | return new MethodEntry( |
| 55 | getClassEntry(method.getDeclaringClass()), | 67 | getClassEntry(method.getDeclaringClass()), |
| @@ -148,4 +160,8 @@ public class EntryFactory { | |||
| 148 | public static BehaviorEntry getObfBehaviorEntry(ClassEntry classEntry, MethodMapping methodMapping) { | 160 | public static BehaviorEntry getObfBehaviorEntry(ClassEntry classEntry, MethodMapping methodMapping) { |
| 149 | return getBehaviorEntry(classEntry, methodMapping.getObfName(), methodMapping.getObfSignature()); | 161 | return getBehaviorEntry(classEntry, methodMapping.getObfName(), methodMapping.getObfSignature()); |
| 150 | } | 162 | } |
| 163 | |||
| 164 | public static BehaviorEntry getObfBehaviorEntry(ClassMapping classMapping, MethodMapping methodMapping) { | ||
| 165 | return getObfBehaviorEntry(getObfClassEntry(classMapping), methodMapping); | ||
| 166 | } | ||
| 151 | } | 167 | } |