void (PsiJavaModule javaModule) { for (PsiRequiresStatement statement : javaModule.getRequires()) { PsiElement element = addReference(statement.getModuleReference()); if (element instanceof PsiJavaModule requiredModule) { Map<String, List<String>> packagesExportedByModule = getPackagesExportedByModule(requiredModule); if (myRequiredModules == null) myRequiredModules = new ArrayList<>(1); myRequiredModules.add(new RequiredModule(requiredModule.getName(), packagesExportedByModule, statement.hasModifierProperty(PsiModifier.TRANSITIVE))); } } }