diff options
| author | 2015-03-11 11:44:24 -0400 | |
|---|---|---|
| committer | 2015-03-11 11:44:24 -0400 | |
| commit | dc2120999c137aa4763ea2358b8df83f4098d280 (patch) | |
| tree | adf96d87f675e76ab3beebadac9c35c1e04b5517 /src/cuchaz/enigma/mapping/ClassMapping.java | |
| parent | generalized field matching (diff) | |
| download | enigma-fork-dc2120999c137aa4763ea2358b8df83f4098d280.tar.gz enigma-fork-dc2120999c137aa4763ea2358b8df83f4098d280.tar.xz enigma-fork-dc2120999c137aa4763ea2358b8df83f4098d280.zip | |
working on writing mappings based on all the matches
Diffstat (limited to 'src/cuchaz/enigma/mapping/ClassMapping.java')
| -rw-r--r-- | src/cuchaz/enigma/mapping/ClassMapping.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/cuchaz/enigma/mapping/ClassMapping.java b/src/cuchaz/enigma/mapping/ClassMapping.java index 07fed32..ac70df0 100644 --- a/src/cuchaz/enigma/mapping/ClassMapping.java +++ b/src/cuchaz/enigma/mapping/ClassMapping.java | |||
| @@ -243,6 +243,15 @@ public class ClassMapping implements Serializable, Comparable<ClassMapping> { | |||
| 243 | } | 243 | } |
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | public void setFieldObfName(String oldObfName, Type obfType, String newObfName) { | ||
| 247 | assert(newObfName != null); | ||
| 248 | FieldMapping fieldMapping = m_fieldsByObf.remove(getFieldKey(oldObfName, obfType)); | ||
| 249 | assert(fieldMapping != null); | ||
| 250 | fieldMapping.setObfName(newObfName); | ||
| 251 | boolean obfWasAdded = m_fieldsByObf.put(getFieldKey(newObfName, obfType), fieldMapping) == null; | ||
| 252 | assert(obfWasAdded); | ||
| 253 | } | ||
| 254 | |||
| 246 | 255 | ||
| 247 | //// METHODS //////// | 256 | //// METHODS //////// |
| 248 | 257 | ||
| @@ -319,6 +328,15 @@ public class ClassMapping implements Serializable, Comparable<ClassMapping> { | |||
| 319 | } | 328 | } |
| 320 | } | 329 | } |
| 321 | 330 | ||
| 331 | public void setMethodObfName(String oldObfName, Signature obfSignature, String newObfName) { | ||
| 332 | assert(newObfName != null); | ||
| 333 | MethodMapping methodMapping = m_methodsByObf.remove(getMethodKey(oldObfName, obfSignature)); | ||
| 334 | assert(methodMapping != null); | ||
| 335 | methodMapping.setObfName(newObfName); | ||
| 336 | boolean obfWasAdded = m_methodsByObf.put(getMethodKey(newObfName, obfSignature), methodMapping) == null; | ||
| 337 | assert(obfWasAdded); | ||
| 338 | } | ||
| 339 | |||
| 322 | //// ARGUMENTS //////// | 340 | //// ARGUMENTS //////// |
| 323 | 341 | ||
| 324 | public void setArgumentName(String obfMethodName, Signature obfMethodSignature, int argumentIndex, String argumentName) { | 342 | public void setArgumentName(String obfMethodName, Signature obfMethodSignature, int argumentIndex, String argumentName) { |