code: private <T> List<? super T> bind(final ResultSet results, final Class<T> klass, final List<? super T> instances)
              throws SQLException {
          if (results == null) {
              throw new NullPointerException("results is null");
          }
          if (klass == null) {
              throw new NullPointerException("klass is null");
          }
          if (instances == null) {
              throw new NullPointerException("instances is null");
          }
          while (results.next()) {
              final T instance;
              try {
                  instance = klass.newInstance();
              } catch (final ReflectiveOperationException roe) {
                  logger.log(SEVERE, format("failed to create new instance of %s", klass), roe);
                  continue;
              }
              instances.add(bind(results, klass, instance));
          }
          return instances;
      }
docs: Binds all records as given type and add them to specified list.
  
  @param <T>       binding type parameter
  @param results   the records to bind
  @param klass     the type of instances
  @param instances a list to which instances are added
  @return given list
  @throws SQLException if a database error occurs.