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/MethodEntry.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 'src/cuchaz/enigma/mapping/MethodEntry.java')
| -rw-r--r-- | src/cuchaz/enigma/mapping/MethodEntry.java | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/cuchaz/enigma/mapping/MethodEntry.java b/src/cuchaz/enigma/mapping/MethodEntry.java index 4afc099..9ea2d08 100644 --- a/src/cuchaz/enigma/mapping/MethodEntry.java +++ b/src/cuchaz/enigma/mapping/MethodEntry.java | |||
| @@ -42,6 +42,20 @@ public class MethodEntry implements Entry, Serializable | |||
| 42 | m_signature = signature; | 42 | m_signature = signature; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | public MethodEntry( MethodEntry other ) | ||
| 46 | { | ||
| 47 | m_classEntry = new ClassEntry( other.m_classEntry ); | ||
| 48 | m_name = other.m_name; | ||
| 49 | m_signature = other.m_signature; | ||
| 50 | } | ||
| 51 | |||
| 52 | public MethodEntry( MethodEntry other, String newClassName ) | ||
| 53 | { | ||
| 54 | m_classEntry = new ClassEntry( newClassName ); | ||
| 55 | m_name = other.m_name; | ||
| 56 | m_signature = other.m_signature; | ||
| 57 | } | ||
| 58 | |||
| 45 | public ClassEntry getClassEntry( ) | 59 | public ClassEntry getClassEntry( ) |
| 46 | { | 60 | { |
| 47 | return m_classEntry; | 61 | return m_classEntry; |
| @@ -58,6 +72,11 @@ public class MethodEntry implements Entry, Serializable | |||
| 58 | return m_signature; | 72 | return m_signature; |
| 59 | } | 73 | } |
| 60 | 74 | ||
| 75 | public String getClassName( ) | ||
| 76 | { | ||
| 77 | return m_classEntry.getName(); | ||
| 78 | } | ||
| 79 | |||
| 61 | @Override | 80 | @Override |
| 62 | public int hashCode( ) | 81 | public int hashCode( ) |
| 63 | { | 82 | { |
| @@ -84,6 +103,6 @@ public class MethodEntry implements Entry, Serializable | |||
| 84 | @Override | 103 | @Override |
| 85 | public String toString( ) | 104 | public String toString( ) |
| 86 | { | 105 | { |
| 87 | return m_classEntry.getName() + "." + m_name + ":" + m_signature; | 106 | return m_classEntry.getName() + "." + m_name + m_signature; |
| 88 | } | 107 | } |
| 89 | } | 108 | } |