Why isn't it possible to construct a GenericType if I know getType and
getRawType?
My situation is something like this:
public <T> List<T> listType(Class<T> type) {
return new GenericType(List.class, type);
}
Seems like that should be possible. What am I missing about erasure? In
GenericType wouldn't new GenericType<List<String>>{} create a type of
List.class with a rawType of String.class? Why can't that be done
programmatically if I know the two types?
Thanks!