@Test public void testTypeLiteralList() { JsonCodec<List<Person>> jsonCodec = jsonCodecFactory.jsonCodec(new TypeToken<List<Person>>() {}); validateListCodec(jsonCodec); }
public <T> JsonCodec<T> jsonCodec(Class<T> type) { requireNonNull(type, "type is null"); return new JsonCodec<>(createObjectMapper(), type); }
JsonCodecFactory { public <T> JsonCodec<T> jsonCodec(Class<T> type) { requireNonNull(type, "type is null"); return new JsonCodec<>(createObjectMapper(), type); } }
JsonCodecFactory { public <T> JsonCodec<T> jsonCodec(Class<T> type) { requireNonNull(type, "type is null"); return new JsonCodec<>(createObjectMapper(), type); } JsonCodecFactory(); @Inject  JsonCodecFactory(Provider<ObjectMapper> objectMapperProvider);  JsonCodecFactory(Provider<ObjectMapper> objectMapperProvider, boolean prettyPrint); }
JsonCodecFactory { public <T> JsonCodec<T> jsonCodec(Class<T> type) { requireNonNull(type, "type is null"); return new JsonCodec<>(createObjectMapper(), type); } JsonCodecFactory(); @Inject  JsonCodecFactory(Provider<ObjectMapper> objectMapperProvider);  JsonCodecFactory(Provider<ObjectMapper> objectMapperProvider, boolean prettyPrint); JsonCodecFactory prettyPrint(); JsonCodec<T> jsonCodec(Class<T> type); JsonCodec<T> jsonCodec(Type type); JsonCodec<T> jsonCodec(TypeToken<T> type); JsonCodec<List<T>> listJsonCodec(Class<T> type); JsonCodec<List<T>> listJsonCodec(JsonCodec<T> type); JsonCodec<Map<K, V>> mapJsonCodec(Class<K> keyType, Class<V> valueType); JsonCodec<Map<K, V>> mapJsonCodec(Class<K> keyType, JsonCodec<V> valueType); }
JsonCodecFactory { public <T> JsonCodec<T> jsonCodec(Class<T> type) { requireNonNull(type, "type is null"); return new JsonCodec<>(createObjectMapper(), type); } JsonCodecFactory(); @Inject  JsonCodecFactory(Provider<ObjectMapper> objectMapperProvider);  JsonCodecFactory(Provider<ObjectMapper> objectMapperProvider, boolean prettyPrint); JsonCodecFactory prettyPrint(); JsonCodec<T> jsonCodec(Class<T> type); JsonCodec<T> jsonCodec(Type type); JsonCodec<T> jsonCodec(TypeToken<T> type); JsonCodec<List<T>> listJsonCodec(Class<T> type); JsonCodec<List<T>> listJsonCodec(JsonCodec<T> type); JsonCodec<Map<K, V>> mapJsonCodec(Class<K> keyType, Class<V> valueType); JsonCodec<Map<K, V>> mapJsonCodec(Class<K> keyType, JsonCodec<V> valueType);  }