collection

This commit is contained in:
redkale
2024-10-11 14:51:49 +08:00
parent d5908815d9
commit 5a7181428f

View File

@@ -286,6 +286,8 @@ public abstract class ConvertFactory<R extends Reader, W extends Writer> {
}
if (type instanceof Class) {
return Collection.class.isAssignableFrom((Class) type);
} else if (!(type instanceof ParameterizedType)) {
return false;
}
ParameterizedType ptype = (ParameterizedType) type;
if (!(ptype.getRawType() instanceof Class)) {
@@ -306,6 +308,8 @@ public abstract class ConvertFactory<R extends Reader, W extends Writer> {
}
if (type instanceof Class) {
return Object.class;
} else if (!(type instanceof ParameterizedType)) {
return null;
}
ParameterizedType ptype = ((ParameterizedType) type);
return ptype.getActualTypeArguments()[0];