code: public <T extends DataObject> List<T> asList(Class<T> type) throws InstantiationException, IllegalAccessException {
          Map<String, Field> fields = new HashMap<String, Field>();
          for (String column: columns) try { fields.put(column, Beans.getKnownField(type, column)); } catch (Exception x) {}
  
          List<T> list = new ArrayList<T>();
          for (Object[] row: rows) {
              T object = type.newInstance();
              for (int i = 0; i < row.length; ++i) {
                  Field field = fields.get(columns[i]);
                  if (field != null) {
                      Beans.setValue(object, field, row[i]);
                  }
              }
              list.add(object);
          }
  
          return list;
      }
docs: Retrieves the contents of this result set as a List of DataObjects.
  
  @param <T> the type of the objects to be in the list
  @param type the class of the objects to be in the list
  @return the list of objects
  @throws InstantiationException if new instances of the given class can't be created
  @throws IllegalAccessException if the fields of the given type can't be read or updated