boolean (PsiClass psiClass, PsiTypeParameter[] typeParameters, PsiType[] newTypeParameters) { final PsiSubstitutor substitutor = PsiSubstitutor.EMPTY.putAll(psiClass, newTypeParameters); for (int i = 0; i < typeParameters.length; i++) { for (PsiClassType bound : typeParameters[i].getExtendsListTypes()) { if (GenericsUtil.checkNotInBounds(newTypeParameters[i], substitutor.substitute(bound), false)) { return false; } } } return true; }