class ZeroUtil {

  public static List<TypeVariableName> extractTypeVars(TypeName type) {
    if (!maybeTypevars(type)) {
      return emptyList();
    }
    List<TypeVariableName> builder = new ArrayList<>();
    TypeWalk walk = new TypeWalk(type);
    while (walk.hasNext()) {
      TypeName next = walk.next();
      if (next instanceof TypeVariableName) {
        if (!builder.contains(next)) {
          builder.add((TypeVariableName) next);
        }
      }
    }
    return builder;
  }

  private  ZeroUtil();

}