boolean (PsiVariable variable, PsiElement context, Set<String> ignoredClasses) { if (context == null) { return false; } final PsiType type = variable.getType(); if (!CollectionUtils.isCollectionClassOrInterface(type)) { return false; } return !ContainerUtil.exists(ignoredClasses, className -> InheritanceUtil.isInheritor(type, className)); }