discomarathon / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Public APIs for type introspection #333

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In order to write type adapters for parameterized types, it would be very 
useful to have machinery for getting the parameter types, as in 
$Gson$Types#getCollectionElementType.  The attached patch provides just such a 
generalization that can be used by authors of type adapters.

Original issue reported on code.google.com by c...@google.com on 17 Jun 2011 at 10:09

Attachments:

GoogleCodeExporter commented 9 years ago
Basically we'd have our own copy of Guice's TypeAdapter class with all of its 
type resolution methods.

Original comment by limpbizkit on 30 Dec 2011 at 6:48

GoogleCodeExporter commented 9 years ago
I believe Guava is going to include a type introspection API in their next 
release. I recommend using that.

Original comment by limpbizkit on 18 Mar 2012 at 8:19