detectGenericType method
Implementation
Type? detectGenericType(TypeInfo typeInfo) {
if (isUnmodifiableListView(typeInfo)) {
return UnmodifiableListView;
}
if (typeInfo.isList) {
return List;
}
if (isHashSet(typeInfo)) {
return HashSet;
}
if (typeInfo.isSet) {
return Set;
}
if (isHashMap(typeInfo)) {
return HashMap;
}
if (isLinkedHashMap(typeInfo)) {
return LinkedHashMap;
}
if (isUnmodifiableMapView(typeInfo)) {
return UnmodifiableMapView;
}
if (typeInfo.isMap) {
return Map;
}
return _knownClassesByName[typeInfo.genericTypeName];
}