void (@NotNull PsiMethod method) { if (!HardcodedMethodConstants.MAIN.equals(method.getName()) || method.hasModifierProperty(PsiModifier.ABSTRACT) || MethodUtils.hasSuper(method)) { return; } if (!PsiMethodUtil.isMainMethod(method)) { registerMethodError(method); return; } PsiClass containingClass = method.getContainingClass(); if (!(containingClass instanceof PsiUnnamedClass) && containingClass != null && containingClass.getQualifiedName() == null) { registerMethodError(method, Boolean.TRUE); // main method not runnable } }