Set<String> (@NotNull PsiJavaModule javaModule) { if (javaModule instanceof LightJavaModule) { return Collections.emptySet(); } return CachedValuesManager.getCachedValue(javaModule, () -> { Set<String> classes = StreamEx.of(javaModule.getProvides().spliterator()) .map(PsiProvidesStatement::getImplementationList) .nonNull() .flatMap(list -> StreamEx.of(list.getReferencedTypes())) .append(StreamEx.of(javaModule.getUses().spliterator()).map(PsiUsesStatement::getClassType).nonNull()) .map(PsiClassType::resolve) .nonNull() .map(PsiClass::getQualifiedName) .nonNull() .toCollection(HashSet::new); return CachedValueProvider.Result.create(classes, javaModule); }); }