code: private String getArrayType(Class cl)
      {
          if (cl.isArray())
              return '[' + getArrayType(cl.getComponentType());
  
          String name = cl.getName();
  
          if (name.equals("java.lang.String"))
              return "string";
          else if (name.equals("java.lang.Object"))
              return "object";
          else if (name.equals("java.util.Date"))
              return "date";
          else
              return name;
      }
docs: Returns the &lt;type> name for a &lt;list>.