Creates a utility class Types, which aims to replace some TypeReference generic classes across the driver main and test code, as well as expose it to the driver users.
Examples:
new TypeReference<Map<String, Object>>() {};
// turns into
Types.mapOf(String.class, Object.class);
new TypeReference<List<String>>() {};
// turns into
Types.listOf(String.class);
Building generics types are faster than loading them from type information because that amounts to one class load per type reference, versus a few invoke calls and load constants.
Yes, I reverse-engineered the type system and Jackson type system to make this.
Creates a utility class
Types
, which aims to replace some TypeReference generic classes across the driver main and test code, as well as expose it to the driver users.Examples:
Building generics types are faster than loading them from type information because that amounts to one class load per type reference, versus a few invoke calls and load constants.
Yes, I reverse-engineered the type system and Jackson type system to make this.