Assuming a generic type declaration (Java)
class Foo { public T bar; }
how can I, at runtime, instantiate a Type object that r
Gson does actually provide a solution for this: https://sites.google.com/site/gson/gson-user-guide#TOC-Serializing-and-Deserializing-Gener
Of course what this does is little more than Bohemian's solution (you still need to pass the type parameter somehow), but done automatically for you.