PsiMethod (@NotNull PsiClass psiClass) { final PsiMethod[] methods = psiClass.findMethodsByName("provider", false); return ContainerUtil.find(methods, m -> m.hasModifierProperty(PsiModifier.PUBLIC) && m.hasModifierProperty(PsiModifier.STATIC) && m.getParameterList().isEmpty()); }