javac ast indices: rename

This commit is contained in:
Dmitry Batkovich
2016-10-31 15:25:29 +03:00
parent d22490021e
commit bb1a3a47fc
2 changed files with 4 additions and 4 deletions
@@ -39,7 +39,7 @@ enum CompilerHierarchySearchType {
}
@Override
Object[] convertIdToSearchableArray(Collection<LightRef> lightRef, ByteArrayEnumerator byteArrayEnumerator) {
Object[] convertToIds(Collection<LightRef> lightRef, ByteArrayEnumerator byteArrayEnumerator) {
return lightRef.stream().map(r -> byteArrayEnumerator.getName(((LightRef.LightClassHierarchyElementDef)r).getName())).toArray(String[]::new);
}
},
@@ -58,7 +58,7 @@ enum CompilerHierarchySearchType {
}
@Override
Object[] convertIdToSearchableArray(Collection<LightRef> lightRef, ByteArrayEnumerator byteArrayEnumerator) {
Object[] convertToIds(Collection<LightRef> lightRef, ByteArrayEnumerator byteArrayEnumerator) {
return lightRef.stream().map(r -> ((LightRef.LightFunExprDef) r).getId()).toArray(Integer[]::new);
}
};
@@ -70,5 +70,5 @@ enum CompilerHierarchySearchType {
abstract Class<? extends LightRef> getRequiredClass(LanguageLightRefAdapter adapter);
abstract Object[] convertIdToSearchableArray(Collection<LightRef> lightRef, ByteArrayEnumerator byteArrayEnumerator);
abstract Object[] convertToIds(Collection<LightRef> lightRef, ByteArrayEnumerator byteArrayEnumerator);
}
@@ -105,7 +105,7 @@ class CompilerReferenceReader {
}
})
.filter(Objects::nonNull)
.collect(groupingBy(x -> x.containingFile, mapping(x -> x.def, collectingAndThen(toList(), l -> searchType.convertIdToSearchableArray(l, myIndex.getByteSeqEum())))));
.collect(groupingBy(x -> x.containingFile, mapping(x -> x.def, collectingAndThen(toList(), l -> searchType.convertToIds(l, myIndex.getByteSeqEum())))));
}
return candidatesPerFile.isEmpty() ? Collections.emptyMap() : candidatesPerFile;