@@ -107,7 +107,7 @@ private Records() {
107107 * @throws IllegalArgumentException if there are duplicate fields defined
108108 */
109109 public static <T extends Record > Dctor <T > dctor (
110- final Class <T > type ,
110+ final Class <? extends T > type ,
111111 final Function <? super RecordComponent , String > toColumnName ,
112112 final List <? extends Dctor .Field <? super T >> fields
113113 ) {
@@ -187,7 +187,7 @@ private static <T extends Record> Dctor.Field<? super T> toFiled(
187187 */
188188 @ SafeVarargs
189189 public static <T extends Record > Dctor <T > dctor (
190- final Class <T > type ,
190+ final Class <? extends T > type ,
191191 final Function <? super RecordComponent , String > toColumnName ,
192192 final Dctor .Field <? super T >... fields
193193 ) {
@@ -233,7 +233,7 @@ public static <T extends Record> Dctor<T> dctor(
233233 */
234234 @ SafeVarargs
235235 public static <T extends Record > Dctor <T > dctor (
236- final Class <T > type ,
236+ final Class <? extends T > type ,
237237 final Dctor .Field <? super T >... fields
238238 ) {
239239 return dctor (type , Records ::toSnakeCase , List .of (fields ));
@@ -343,7 +343,7 @@ public static String toSnakeCase(final String name) {
343343 * @throws NullPointerException if one of the arguments is {@code null}
344344 */
345345 public static <T extends Record > RowParser <T > parser (
346- final Class <T > type ,
346+ final Class <? extends T > type ,
347347 final Function <? super RecordComponent , String > toColumnName ,
348348 final Function <? super RecordComponent , ? extends RowParser <?>> fields
349349 ) {
@@ -357,7 +357,7 @@ public static <T extends Record> RowParser<T> parser(
357357 .map (toColumnName )
358358 .toArray (String []::new );
359359
360- final Constructor < T > ctor = ctor (type );
360+ final var ctor = ctor (type );
361361
362362 return (row , conn ) -> {
363363 final Object [] values = new Object [components .length ];
@@ -402,7 +402,7 @@ public static <T extends Record> RowParser<T> parser(
402402 * @throws NullPointerException if one of the arguments is {@code null}
403403 */
404404 public static <T extends Record > RowParser <T > parser (
405- final Class <T > type ,
405+ final Class <? extends T > type ,
406406 final Map <? super String , String > toColumnName ,
407407 final Map <? super String , ? extends RowParser <?>> fields
408408 ) {
@@ -442,7 +442,7 @@ public static <T extends Record> RowParser<T> parser(
442442 * @throws NullPointerException if one of the arguments is {@code null}
443443 */
444444 public static <T extends Record > RowParser <T > parserWithColumnNames (
445- final Class <T > type ,
445+ final Class <? extends T > type ,
446446 final Function <? super RecordComponent , String > toColumnName
447447 ) {
448448 return parser (type , toColumnName , component -> null );
@@ -470,7 +470,7 @@ public static <T extends Record> RowParser<T> parserWithColumnNames(
470470 * @throws NullPointerException if one of the arguments is {@code null}
471471 */
472472 public static <T extends Record > RowParser <T > parserWithColumnNames (
473- final Class <T > type ,
473+ final Class <? extends T > type ,
474474 final Map <? super String , String > toColumnName
475475 ) {
476476 return parser (type , toColumnName , Map .of ());
@@ -502,7 +502,7 @@ public static <T extends Record> RowParser<T> parserWithColumnNames(
502502 * @throws NullPointerException if one of the arguments is {@code null}
503503 */
504504 public static <T extends Record > RowParser <T > parserWithFields (
505- final Class <T > type ,
505+ final Class <? extends T > type ,
506506 final Function <? super RecordComponent , ? extends RowParser <?>> fields
507507 ) {
508508 return parser (type , Records ::toSnakeCase , fields );
@@ -529,7 +529,7 @@ public static <T extends Record> RowParser<T> parserWithFields(
529529 * @throws NullPointerException if one of the arguments is {@code null}
530530 */
531531 public static <T extends Record > RowParser <T > parserWithFields (
532- final Class <T > type ,
532+ final Class <? extends T > type ,
533533 final Map <? super String , ? extends RowParser <?>> fields
534534 ) {
535535 return parser (type , Records ::toSnakeCase , cmp -> fields .get (cmp .getName ()));
@@ -550,7 +550,7 @@ public static <T extends Record> RowParser<T> parserWithFields(
550550 * @return a new row-parser for the given record {@code type}
551551 * @throws NullPointerException if one of the arguments is {@code null}
552552 */
553- public static <T extends Record > RowParser <T > parser (final Class <T > type ) {
553+ public static <T extends Record > RowParser <T > parser (final Class <? extends T > type ) {
554554 return parser (type , Records ::toSnakeCase , component -> null );
555555 }
556556
0 commit comments