TypeReference
is an abstract class, so when you do new TypeReference<Foo> {}
, Jackson depends on Java creating a new class that extends TypeReference
. Then it gets the class inside the constructor using recursion. But I guess the compiler doesn't bother extending TypeReference<T>
in the generated class, it just extends the raw type?