boolean (PsiModifierListOwner owner) { if (!(owner instanceof PsiMethod)) return false; PsiClass returnClass = PsiUtil.resolveClassInClassTypeOnly(((PsiMethod)owner).getReturnType()); return InheritanceUtil.isInheritor(returnClass, CommonClassNames.JAVA_UTIL_COLLECTION) || InheritanceUtil.isInheritor(returnClass, CommonClassNames.JAVA_UTIL_MAP); }