public static boolean bindsTypeVariables(final PsiType t) {
    if (t == null) {
      return false;
    }

    if (t instanceof PsiTypeVariable) {
      return true;
    }

    if (t instanceof PsiArrayType) {
      return bindsTypeVariables(((PsiArrayType)t).getComponentType());
    }

    if (t instanceof PsiWildcardType) {
      return bindsTypeVariables(((PsiWildcardType)t).getBound());
    }

    if (t instanceof PsiIntersectionType) {
      final PsiType[] conjuncts = ((PsiIntersectionType)t).getConjuncts();
      for (PsiType conjunct : conjuncts) {
        if (bindsTypeVariables(conjunct)) return true;
      }
      return false;
    }

    final PsiClassType.ClassResolveResult result = resolveType(t);

    if (result.getElement() != null) {
      final PsiSubstitutor subst = result.getSubstitutor();

      for (final PsiType psiType : subst.getSubstitutionMap().values()) {
        if (bindsTypeVariables(psiType)) {
          return true;
        }
      }
    }

    return false;
  }
public static boolean bindsTypeVariables(final PsiType t)