PsiJavaModule (@NotNull Project project, @NotNull String modulePath) { VirtualFile moduleFile = LocalFileSystem.getInstance().findFileByPath(modulePath); if (moduleFile == null) return null; return JavaModuleGraphUtil.findDescriptorByFile(moduleFile, project); }