diff options
| author | 2014-07-27 22:33:21 -0400 | |
|---|---|---|
| committer | 2014-07-27 22:33:21 -0400 | |
| commit | d7321b5b0d38c575e54c770f7aa18dacbacab3c8 (patch) | |
| tree | ef4b3e0f83b1fe89125c2674fec023871e70c0d8 /src/cuchaz/enigma/mapping/TranslationDirection.java | |
| parent | made gui responsive to caret position and show identifier info (diff) | |
| download | enigma-fork-d7321b5b0d38c575e54c770f7aa18dacbacab3c8.tar.gz enigma-fork-d7321b5b0d38c575e54c770f7aa18dacbacab3c8.tar.xz enigma-fork-d7321b5b0d38c575e54c770f7aa18dacbacab3c8.zip | |
added identifier renaming capability
copied some code over from M3L to handle the heavy bytecode magic.
It's ok... M3L will eventually depend on Enigma.
Completely restructured the mappings though. This way is better. =)
Diffstat (limited to '')
| -rw-r--r-- | src/cuchaz/enigma/mapping/TranslationDirection.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/cuchaz/enigma/mapping/TranslationDirection.java b/src/cuchaz/enigma/mapping/TranslationDirection.java new file mode 100644 index 0000000..79ae0d3 --- /dev/null +++ b/src/cuchaz/enigma/mapping/TranslationDirection.java | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /******************************************************************************* | ||
| 2 | * Copyright (c) 2014 Jeff Martin. | ||
| 3 | * All rights reserved. This program and the accompanying materials | ||
| 4 | * are made available under the terms of the GNU Public License v3.0 | ||
| 5 | * which accompanies this distribution, and is available at | ||
| 6 | * http://www.gnu.org/licenses/gpl.html | ||
| 7 | * | ||
| 8 | * Contributors: | ||
| 9 | * Jeff Martin - initial API and implementation | ||
| 10 | ******************************************************************************/ | ||
| 11 | package cuchaz.enigma.mapping; | ||
| 12 | |||
| 13 | |||
| 14 | public enum TranslationDirection | ||
| 15 | { | ||
| 16 | Deobfuscating | ||
| 17 | { | ||
| 18 | @Override | ||
| 19 | public <T> T choose( T deobfChoice, T obfChoice ) | ||
| 20 | { | ||
| 21 | return deobfChoice; | ||
| 22 | } | ||
| 23 | }, | ||
| 24 | Obfuscating | ||
| 25 | { | ||
| 26 | @Override | ||
| 27 | public <T> T choose( T deobfChoice, T obfChoice ) | ||
| 28 | { | ||
| 29 | return obfChoice; | ||
| 30 | } | ||
| 31 | }; | ||
| 32 | |||
| 33 | public abstract <T> T choose( T deobfChoice, T obfChoice ); | ||
| 34 | } | ||