diff options
| author | 2016-07-04 18:14:22 +1000 | |
|---|---|---|
| committer | 2016-07-04 18:14:22 +1000 | |
| commit | 59e189bef2b5e6d129fb7c2c988ed0b2130e36ac (patch) | |
| tree | 2b638e60905251de85a4917152d6fc39a4112194 /src/main/java/cuchaz/enigma/mapping/MethodEntry.java | |
| parent | Fixed Obf Class list order (diff) | |
| download | enigma-fork-59e189bef2b5e6d129fb7c2c988ed0b2130e36ac.tar.gz enigma-fork-59e189bef2b5e6d129fb7c2c988ed0b2130e36ac.tar.xz enigma-fork-59e189bef2b5e6d129fb7c2c988ed0b2130e36ac.zip | |
Reformat
Diffstat (limited to 'src/main/java/cuchaz/enigma/mapping/MethodEntry.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/mapping/MethodEntry.java | 46 |
1 files changed, 18 insertions, 28 deletions
diff --git a/src/main/java/cuchaz/enigma/mapping/MethodEntry.java b/src/main/java/cuchaz/enigma/mapping/MethodEntry.java index 7df4dd8..4d7ed8f 100644 --- a/src/main/java/cuchaz/enigma/mapping/MethodEntry.java +++ b/src/main/java/cuchaz/enigma/mapping/MethodEntry.java | |||
| @@ -10,17 +10,13 @@ | |||
| 10 | ******************************************************************************/ | 10 | ******************************************************************************/ |
| 11 | package cuchaz.enigma.mapping; | 11 | package cuchaz.enigma.mapping; |
| 12 | 12 | ||
| 13 | import java.io.Serializable; | 13 | import cuchaz.enigma.utils.Utils; |
| 14 | 14 | ||
| 15 | import cuchaz.enigma.Util; | 15 | public class MethodEntry implements BehaviorEntry { |
| 16 | 16 | ||
| 17 | public class MethodEntry implements BehaviorEntry, Serializable { | 17 | private ClassEntry classEntry; |
| 18 | 18 | private String name; | |
| 19 | private static final long serialVersionUID = 4770915224467247458L; | 19 | private Signature signature; |
| 20 | |||
| 21 | private ClassEntry m_classEntry; | ||
| 22 | private String m_name; | ||
| 23 | private Signature m_signature; | ||
| 24 | 20 | ||
| 25 | public MethodEntry(ClassEntry classEntry, String name, Signature signature) { | 21 | public MethodEntry(ClassEntry classEntry, String name, Signature signature) { |
| 26 | if (classEntry == null) { | 22 | if (classEntry == null) { |
| @@ -36,41 +32,35 @@ public class MethodEntry implements BehaviorEntry, Serializable { | |||
| 36 | throw new IllegalArgumentException("Don't use MethodEntry for a constructor!"); | 32 | throw new IllegalArgumentException("Don't use MethodEntry for a constructor!"); |
| 37 | } | 33 | } |
| 38 | 34 | ||
| 39 | m_classEntry = classEntry; | 35 | this.classEntry = classEntry; |
| 40 | m_name = name; | 36 | this.name = name; |
| 41 | m_signature = signature; | 37 | this.signature = signature; |
| 42 | } | ||
| 43 | |||
| 44 | public MethodEntry(MethodEntry other) { | ||
| 45 | m_classEntry = new ClassEntry(other.m_classEntry); | ||
| 46 | m_name = other.m_name; | ||
| 47 | m_signature = other.m_signature; | ||
| 48 | } | 38 | } |
| 49 | 39 | ||
| 50 | public MethodEntry(MethodEntry other, String newClassName) { | 40 | public MethodEntry(MethodEntry other, String newClassName) { |
| 51 | m_classEntry = new ClassEntry(newClassName); | 41 | this.classEntry = new ClassEntry(newClassName); |
| 52 | m_name = other.m_name; | 42 | this.name = other.name; |
| 53 | m_signature = other.m_signature; | 43 | this.signature = other.signature; |
| 54 | } | 44 | } |
| 55 | 45 | ||
| 56 | @Override | 46 | @Override |
| 57 | public ClassEntry getClassEntry() { | 47 | public ClassEntry getClassEntry() { |
| 58 | return m_classEntry; | 48 | return this.classEntry; |
| 59 | } | 49 | } |
| 60 | 50 | ||
| 61 | @Override | 51 | @Override |
| 62 | public String getName() { | 52 | public String getName() { |
| 63 | return m_name; | 53 | return this.name; |
| 64 | } | 54 | } |
| 65 | 55 | ||
| 66 | @Override | 56 | @Override |
| 67 | public Signature getSignature() { | 57 | public Signature getSignature() { |
| 68 | return m_signature; | 58 | return this.signature; |
| 69 | } | 59 | } |
| 70 | 60 | ||
| 71 | @Override | 61 | @Override |
| 72 | public String getClassName() { | 62 | public String getClassName() { |
| 73 | return m_classEntry.getName(); | 63 | return this.classEntry.getName(); |
| 74 | } | 64 | } |
| 75 | 65 | ||
| 76 | @Override | 66 | @Override |
| @@ -80,7 +70,7 @@ public class MethodEntry implements BehaviorEntry, Serializable { | |||
| 80 | 70 | ||
| 81 | @Override | 71 | @Override |
| 82 | public int hashCode() { | 72 | public int hashCode() { |
| 83 | return Util.combineHashesOrdered(m_classEntry, m_name, m_signature); | 73 | return Utils.combineHashesOrdered(this.classEntry, this.name, this.signature); |
| 84 | } | 74 | } |
| 85 | 75 | ||
| 86 | @Override | 76 | @Override |
| @@ -89,11 +79,11 @@ public class MethodEntry implements BehaviorEntry, Serializable { | |||
| 89 | } | 79 | } |
| 90 | 80 | ||
| 91 | public boolean equals(MethodEntry other) { | 81 | public boolean equals(MethodEntry other) { |
| 92 | return m_classEntry.equals(other.m_classEntry) && m_name.equals(other.m_name) && m_signature.equals(other.m_signature); | 82 | return this.classEntry.equals(other.classEntry) && this.name.equals(other.name) && this.signature.equals(other.signature); |
| 93 | } | 83 | } |
| 94 | 84 | ||
| 95 | @Override | 85 | @Override |
| 96 | public String toString() { | 86 | public String toString() { |
| 97 | return m_classEntry.getName() + "." + m_name + m_signature; | 87 | return this.classEntry.getName() + "." + this.name + this.signature; |
| 98 | } | 88 | } |
| 99 | } | 89 | } |