boolean (@NotNull PsiClass aClass, @Nullable PsiType type, @NotNull Set<? super PsiClass> checked) { PsiClass resolvedClass = PsiUtil.resolveClassInType(type); if (resolvedClass != null && resolvedClass.isAnnotationType()) { if (aClass == resolvedClass) { return true; } if (!checked.add(resolvedClass) || !BaseIntentionAction.canModify(resolvedClass)) return false; PsiMethod[] methods = resolvedClass.getMethods(); for (PsiMethod method : methods) { if (cyclicDependencies(aClass, method.getReturnType(), checked)) return true; } } return false; }