The metaphor is used to deal with complex issues in generic types. Using it for a non-generic type like Vector seems, indeed, odd.
On Mon, May 31, 2010 at 1:04 PM, Sean Owen <[email protected]> wrote: > While wandering through the code I saw this construction: > > Type vectorType = new TypeToken<Vector>() {}.getType(); > > from reading the GSON source, it seems this is really just a long way of > saying: > > Type vectorType = Vector.class; > > am I missing anything? would be nice to not construct a new anonymous > class in these 5 instances or so. > But it's minor. >
