boolean (@Nullable PsiClass parameter, @NotNull PsiElement context, @NotNull PsiResolveHelper resolveHelper) { if (!(parameter instanceof PsiTypeParameter typeParameter)) return false; String name = typeParameter.getName(); return name == null || resolveHelper.resolveReferencedClass(name, context) != parameter; }