boolean (PsiClass aClass, String methodName) { for (PsiMethod method : aClass.findMethodsByName(methodName, false)) { if (PsiTypes.voidType().equals(method.getReturnType()) && method.hasModifierProperty(PsiModifier.PUBLIC) && method.hasModifierProperty(PsiModifier.STATIC)) { return true; } } return false; }