Commit Graph

21 Commits

Author SHA1 Message Date
Johannes Frohnmeyer dc4e61ac7b
Several breaking changes 2022-05-17 21:20:10 +02:00
Marcono1234 4dda4ec5ba
Use diamond operator when creating generic instances (#2104) 2022-04-17 15:27:21 -07:00
Anirudh Ramanan 9e44d60b83 Eliminating code overhead
* calculating size of the list once in case of loops, avoided creation of string builder object if the length type argument is 0
* replaced null check boilerplate code with nullSafe()
2017-03-01 11:13:56 -05:00
Inderjeet Singh e5b3f6368d updated minimum JDK version to 1.6.
Added Overrides for methods implementing an interface.
2015-11-04 18:52:20 -08:00
Inderjeet Singh 26016ca66e removed eclipse warnings, unused fields. Made inner classes static where possible. 2013-04-12 20:09:08 +00:00
Jesse Wilson af4879dbb7 Move interceptors from 'alpha' to 'extras'.
This makes the feature less risky to use! It now uses our
TypeAdapterFactory infrastructure rather than relying on
parallel infrastructure.
2012-10-23 17:36:30 +00:00
Inderjeet Singh fd4fbe4132 Added support for collections, maps, and arbitrary depth of type adapters for Intercept annotation.
Added more tests for the features.
2012-10-18 02:37:43 +00:00
Jesse Wilson d7fbac0384 Rename TypeAdapter.Factory to TypeAdapterFactory. 2011-12-23 18:27:13 +00:00
Jesse Wilson f602bce9f5 Nice documentation for TypeAdapter. 2011-12-03 19:46:25 +00:00
Jesse Wilson 26ab404599 Cleanup names for TypeAdapters. 2011-12-02 22:57:30 +00:00
Jesse Wilson f777a192ee Remove dead code and fold contents of single-member helper classes into their clients. 2011-11-20 21:02:26 +00:00
Jesse Wilson 7e760143fd Smash together MiniGson and Gson. This changes Gson to be the MiniGson rather than delegating to the MiniGson. It means that the MiniGson objects passed into streaming type adapters are now fully-capable 'Gson' objects.
The most notable impact of this change is that it adds several new public APIs:
 - The TypeAdapter abstract class
 - The TypeAdapter.Factory interface
 - Four new methods on GsonBuilder to register streaming TypeAdapters (via Factory, via Class, via TypeToken, and as a type hierarchy)
 - Three new methods on Gson to lookup streaming TypeAdapters (by type, by class, and to get the next type adapter) 

Still outstanding:
 - Write beautiful prose to document the new APIs above
 - Change GsonBuilder's precedence so that both old and new-style type adapters are registered in one lot
2011-11-20 15:23:08 +00:00
Inderjeet Singh 31964507c1 Updated SuppressWarnings annotations to Eclipse 3.6/3.7 which is unfortunately incompatible with Eclipse 3.5 (rawtypes vs unchecked)
This CL eliminates all eclipse warnings.
2011-10-20 21:32:46 +00:00
Jesse Wilson 0e02cbb33e Nulls are here to stay. Sigh. 2011-10-14 03:20:05 +00:00
Inderjeet Singh 47a36fd095 Fixed Eclipse warnings 2011-09-30 17:08:35 +00:00
Inderjeet Singh 2780a2a9bf Fixed eclipse warnings. 2011-09-16 06:03:16 +00:00
Inderjeet Singh ad5ff0f2d9 Created a wrapper for runtime type determination. 2011-08-05 00:41:24 +00:00
Inderjeet Singh e9a971f680 Revised getRuntimeTypeIfMoreSpecific to ignore the parent and just focus on the value.
All uses of this method have already made a determination about the parent.
2011-08-05 00:13:01 +00:00
Inderjeet Singh 6e3bf07300 Added support for runtime type determination while serializing array elements.
Created a utility class Reflection to hold methods to find Runtime type and creating new Instances.
2011-08-04 23:02:06 +00:00
Inderjeet Singh f276d13827 Added support for deserialization exclusion strategy. 2011-08-03 01:19:26 +00:00
Jesse Wilson 60e6ed912d Promote MiniGson to gson.internal.bind 2011-08-03 00:25:10 +00:00