兼容泛型嵌套

This commit is contained in:
Redkale
2018-12-19 18:38:28 +08:00
parent 702ab6ef6e
commit 61a5420d48

View File

@@ -132,6 +132,8 @@ public abstract class TypeToken<T> {
if (asts[i] == type) return atas[i];
}
}
Type moreType = ((ParameterizedType) superType).getRawType();
if (moreType != Object.class) return getGenericType(type, moreType);
}
TypeVariable tv = (TypeVariable) type;
if (tv.getBounds().length == 1) return tv.getBounds()[0];