Assuming a generic type declaration (Java)
class Foo { public T bar; }
how can I, at runtime, instantiate a Type object that r
It appeared to be really simpler than most people thought:
Type collectionType = new TypeToken>(){}.getType(); ArrayList persons = gson.fromJson(response, collectionType);
No need to copy ParameterizedTypeImpl class as newacct suggested.