diff options
| author | 2016-07-02 18:04:57 +1000 | |
|---|---|---|
| committer | 2016-07-02 18:04:57 +1000 | |
| commit | 64c359d3c1d2347001e5c6becb1d7561457f52cc (patch) | |
| tree | bc2f37325b770475237437d204e95254dbfa0b3d /src/main/java/cuchaz/enigma/analysis/EntryReference.java | |
| parent | Fixed Null.json and #4 (diff) | |
| download | enigma-fork-64c359d3c1d2347001e5c6becb1d7561457f52cc.tar.gz enigma-fork-64c359d3c1d2347001e5c6becb1d7561457f52cc.tar.xz enigma-fork-64c359d3c1d2347001e5c6becb1d7561457f52cc.zip | |
Renamed Fields
Diffstat (limited to 'src/main/java/cuchaz/enigma/analysis/EntryReference.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/analysis/EntryReference.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/main/java/cuchaz/enigma/analysis/EntryReference.java b/src/main/java/cuchaz/enigma/analysis/EntryReference.java index eb58388..6a7a4bf 100644 --- a/src/main/java/cuchaz/enigma/analysis/EntryReference.java +++ b/src/main/java/cuchaz/enigma/analysis/EntryReference.java | |||
| @@ -24,7 +24,7 @@ public class EntryReference<E extends Entry, C extends Entry> { | |||
| 24 | public E entry; | 24 | public E entry; |
| 25 | public C context; | 25 | public C context; |
| 26 | 26 | ||
| 27 | private boolean m_isNamed; | 27 | private boolean sourceName; |
| 28 | 28 | ||
| 29 | public EntryReference(E entry, String sourceName) { | 29 | public EntryReference(E entry, String sourceName) { |
| 30 | this(entry, sourceName, null); | 30 | this(entry, sourceName, null); |
| @@ -38,16 +38,16 @@ public class EntryReference<E extends Entry, C extends Entry> { | |||
| 38 | this.entry = entry; | 38 | this.entry = entry; |
| 39 | this.context = context; | 39 | this.context = context; |
| 40 | 40 | ||
| 41 | m_isNamed = sourceName != null && sourceName.length() > 0; | 41 | this.sourceName = sourceName != null && sourceName.length() > 0; |
| 42 | if (entry instanceof ConstructorEntry && ConstructorNonNames.contains(sourceName)) { | 42 | if (entry instanceof ConstructorEntry && ConstructorNonNames.contains(sourceName)) { |
| 43 | m_isNamed = false; | 43 | this.sourceName = false; |
| 44 | } | 44 | } |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | public EntryReference(E entry, C context, EntryReference<E, C> other) { | 47 | public EntryReference(E entry, C context, EntryReference<E, C> other) { |
| 48 | this.entry = entry; | 48 | this.entry = entry; |
| 49 | this.context = context; | 49 | this.context = context; |
| 50 | m_isNamed = other.m_isNamed; | 50 | this.sourceName = other.sourceName; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | public ClassEntry getLocationClassEntry() { | 53 | public ClassEntry getLocationClassEntry() { |
| @@ -58,7 +58,7 @@ public class EntryReference<E extends Entry, C extends Entry> { | |||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | public boolean isNamed() { | 60 | public boolean isNamed() { |
| 61 | return m_isNamed; | 61 | return this.sourceName; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | public Entry getNameableEntry() { | 64 | public Entry getNameableEntry() { |
| @@ -91,10 +91,7 @@ public class EntryReference<E extends Entry, C extends Entry> { | |||
| 91 | 91 | ||
| 92 | @Override | 92 | @Override |
| 93 | public boolean equals(Object other) { | 93 | public boolean equals(Object other) { |
| 94 | if (other instanceof EntryReference) { | 94 | return other instanceof EntryReference && equals((EntryReference<?, ?>) other); |
| 95 | return equals((EntryReference<?, ?>) other); | ||
| 96 | } | ||
| 97 | return false; | ||
| 98 | } | 95 | } |
| 99 | 96 | ||
| 100 | public boolean equals(EntryReference<?, ?> other) { | 97 | public boolean equals(EntryReference<?, ?> other) { |