boolean (final PsiClass psiClass) { for (JavaMainMethodProvider provider : JavaMainMethodProvider.EP_NAME.getExtensionList()) { if (provider.isApplicable(psiClass)) { return provider.hasMainMethod(psiClass); } } return findMainMethod(psiClass.findMethodsByName("main", true), psiClass) != null; }