boolean (@NotNull Iterable<? extends PsiPackageAccessibilityStatement> statements, @NotNull String packageName, @NotNull PsiJavaModule javaModule) { for (PsiPackageAccessibilityStatement statement : statements) { if (packageName.equals(statement.getPackageName())) { final List<String> moduleNames = statement.getModuleNames(); if (moduleNames.isEmpty() || moduleNames.contains(javaModule.getName())) { return true; } } } return false; }