boolean (@NotNull PsiJavaModule source, @NotNull String packageName, @Nullable PsiJavaModule target) { Map<String, Set<String>> exports = CachedValuesManager.getCachedValue(source, () -> Result.create(exportsMap(source), source.getContainingFile())); Set<String> targets = exports.get(packageName); return targets != null && (targets.isEmpty() || target != null && targets.contains(target.getName())); }