diff options
| author | 2016-10-19 17:44:04 +0200 | |
|---|---|---|
| committer | 2016-10-19 17:47:26 +0200 | |
| commit | 72115a6e4c83422b7359a9ae4d60badc244b55ff (patch) | |
| tree | 6882be6d90bc1ebd5eb849f1a069b9eb5c07c247 /src/main/java/cuchaz/enigma/Deobfuscator.java | |
| parent | LocalVariableRenamer: Support correctly Nested Class constructors (Fix #49) (diff) | |
| download | enigma-fork-72115a6e4c83422b7359a9ae4d60badc244b55ff.tar.gz enigma-fork-72115a6e4c83422b7359a9ae4d60badc244b55ff.tar.xz enigma-fork-72115a6e4c83422b7359a9ae4d60badc244b55ff.zip | |
Starting implementing local variables (#33)
TODO:
- Store format (need to be defined)
- Implement some translate operations
This commit also fix some cases where argument tokens are not selected
Diffstat (limited to 'src/main/java/cuchaz/enigma/Deobfuscator.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/Deobfuscator.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/cuchaz/enigma/Deobfuscator.java b/src/main/java/cuchaz/enigma/Deobfuscator.java index e9a998d..22194ad 100644 --- a/src/main/java/cuchaz/enigma/Deobfuscator.java +++ b/src/main/java/cuchaz/enigma/Deobfuscator.java | |||
| @@ -533,6 +533,10 @@ public class Deobfuscator { | |||
| 533 | return false; | 533 | return false; |
| 534 | } else if (obfEntry instanceof ArgumentEntry) { | 534 | } else if (obfEntry instanceof ArgumentEntry) { |
| 535 | return translator.translate((ArgumentEntry) obfEntry) != null; | 535 | return translator.translate((ArgumentEntry) obfEntry) != null; |
| 536 | } else if (obfEntry instanceof LocalVariableEntry) { | ||
| 537 | // TODO: Implement it | ||
| 538 | //return translator.translate((LocalVariableEntry)obfEntry) != null; | ||
| 539 | return false; | ||
| 536 | } else { | 540 | } else { |
| 537 | throw new Error("Unknown entry type: " + obfEntry.getClass().getName()); | 541 | throw new Error("Unknown entry type: " + obfEntry.getClass().getName()); |
| 538 | } | 542 | } |
| @@ -549,6 +553,8 @@ public class Deobfuscator { | |||
| 549 | throw new IllegalArgumentException("Cannot rename constructors"); | 553 | throw new IllegalArgumentException("Cannot rename constructors"); |
| 550 | } else if (obfEntry instanceof ArgumentEntry) { | 554 | } else if (obfEntry instanceof ArgumentEntry) { |
| 551 | this.renamer.setArgumentTreeName((ArgumentEntry) obfEntry, newName); | 555 | this.renamer.setArgumentTreeName((ArgumentEntry) obfEntry, newName); |
| 556 | } else if (obfEntry instanceof LocalVariableEntry) { | ||
| 557 | // TODO: Implement it | ||
| 552 | } else { | 558 | } else { |
| 553 | throw new Error("Unknown entry type: " + obfEntry.getClass().getName()); | 559 | throw new Error("Unknown entry type: " + obfEntry.getClass().getName()); |
| 554 | } | 560 | } |
| @@ -587,6 +593,8 @@ public class Deobfuscator { | |||
| 587 | throw new IllegalArgumentException("Cannot rename constructors"); | 593 | throw new IllegalArgumentException("Cannot rename constructors"); |
| 588 | } else if (obfEntry instanceof ArgumentEntry) { | 594 | } else if (obfEntry instanceof ArgumentEntry) { |
| 589 | this.renamer.markArgumentAsDeobfuscated((ArgumentEntry) obfEntry); | 595 | this.renamer.markArgumentAsDeobfuscated((ArgumentEntry) obfEntry); |
| 596 | } else if (obfEntry instanceof LocalVariableEntry) { | ||
| 597 | // TODO: Implement it | ||
| 590 | } else { | 598 | } else { |
| 591 | throw new Error("Unknown entry type: " + obfEntry); | 599 | throw new Error("Unknown entry type: " + obfEntry); |
| 592 | } | 600 | } |