private static boolean hasSuperTypeAssignableFromSam(PsiClass sam, PsiType type) {
    return !InheritanceUtil.processSuperTypes(type, false, superType ->
      !InheritanceUtil.isInheritorOrSelf(sam, PsiUtil.resolveClassInClassTypeOnly(superType), true));
  }
private static boolean hasSuperTypeAssignableFromSam(PsiClass sam, PsiType type)