diff options
Diffstat (limited to 'src/main/java/cuchaz/enigma/analysis/TranslationIndex.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/analysis/TranslationIndex.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/cuchaz/enigma/analysis/TranslationIndex.java b/src/main/java/cuchaz/enigma/analysis/TranslationIndex.java index db11662..984d84b 100644 --- a/src/main/java/cuchaz/enigma/analysis/TranslationIndex.java +++ b/src/main/java/cuchaz/enigma/analysis/TranslationIndex.java | |||
| @@ -155,6 +155,17 @@ public class TranslationIndex { | |||
| 155 | return ancestors; | 155 | return ancestors; |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | public List<ClassEntry> getImplementers(ClassEntry classEntry) { | ||
| 159 | // linear search is fast enough for now | ||
| 160 | List<ClassEntry> implementers = Lists.newArrayList(); | ||
| 161 | for (ClassEntry itf : this.interfaces.keySet()) { | ||
| 162 | if (this.interfaces.containsEntry(itf, classEntry)) { | ||
| 163 | implementers.add(itf); | ||
| 164 | } | ||
| 165 | } | ||
| 166 | return implementers; | ||
| 167 | } | ||
| 168 | |||
| 158 | public List<ClassEntry> getSubclass(ClassEntry classEntry) { | 169 | public List<ClassEntry> getSubclass(ClassEntry classEntry) { |
| 159 | // linear search is fast enough for now | 170 | // linear search is fast enough for now |
| 160 | List<ClassEntry> subclasses = Lists.newArrayList(); | 171 | List<ClassEntry> subclasses = Lists.newArrayList(); |