@NotNull
  private static Set<PsiTypeParameter> getTypeParameters(@NotNull PsiType type) {
    if (type instanceof PsiClassType) {
      PsiTypesUtil.TypeParameterSearcher searcher = new PsiTypesUtil.TypeParameterSearcher();
      type.accept(searcher);
      return searcher.getTypeParameters();
    }
    return Collections.emptySet();
  }
@NotNull
  private static Set<PsiTypeParameter> getTypeParameters(@NotNull PsiType type)