Set<String> (@NotNull PsiJavaModule javaModule) { if (javaModule instanceof LightJavaModule) { return Collections.emptySet(); } return CachedValuesManager.getCachedValue(javaModule, () -> { Set<String> packages = StreamEx.of(javaModule.getExports().spliterator()) .map(PsiPackageAccessibilityStatement::getPackageName) .nonNull() .toCollection(HashSet::new); return CachedValueProvider.Result.create(packages, javaModule); }); }