boolean (PsiModifierListOwner element, String[] configAnnotationsFqn) { if (element instanceof PsiClass) { for (PsiMethod method : ((PsiClass)element).getAllMethods()) { if (isConfigMethod(method, configAnnotationsFqn)) return true; } } else { if (!(element instanceof PsiMethod)) return false; return isConfigMethod((PsiMethod)element, configAnnotationsFqn); } return false; }