code: private static void buildClass(StringBuilder builder, Class cls) {
          int arrayDims = 0;
          Class tmp = cls;
          while (tmp.isArray()) {
              arrayDims++;
              tmp = tmp.getComponentType();
          }
          builder.append(tmp.getName());
          if (arrayDims > 0) {
              for (; arrayDims > 0 ; arrayDims--) {
                  builder.append("[]");
              }
          }
      }
docs: Build Java code to represent a type reference to the given class.
  
  This will be of the form "pkg.Cls1" or "pkc.Cls2[]" or "primtype".
  
  @param builder the builder in which to build the type reference
  @param cls the type for the reference