Parts of this file were taken from Jackson/core TypeReference under the Apache License:
Apache (Software) License, version 2.0 ("the License").
See the License for details about distribution rights, and the
specific rights regarding derivate works.
You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
A class to hold onto generic type params for object mapping by creating a anonymous subtype.
This is a common "trick" commonly used in Java to avoid issues with type erasure.
Other examples can be found in popular libraries like Jackson, GSON, and Spring
GenericType ref = new GenericType<List<Integer>>() { };