-
- All Implemented Interfaces:
-
com.jillesvangurp.eskotlinwrapper.ModelReaderAndWriter
public final class JacksonModelReaderAndWriter<T extends Object> implements ModelReaderAndWriter<T>
Simple implementation of ModelReaderAndWriter that uses a jackson object mapper.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
JacksonModelReaderAndWriter.Companion
-
Field Summary
Fields Modifier and Type Field Description private final KClass<T>
clazz
private final ObjectMapper
objectMapper
-
Constructor Summary
Constructors Constructor Description JacksonModelReaderAndWriter(Class<T> javaClazz, ObjectMapper objectMapper)
Alternate constructor so we can instantiate from Java as well JacksonModelReaderAndWriter(KClass<T> clazz, ObjectMapper objectMapper)
-
Method Summary
Modifier and Type Method Description Function1<ByteArray, T>
deserializer()
Function1<T, ByteArray>
serializer()
KClass<T>
getClazz()
final ObjectMapper
getObjectMapper()
-
Methods inherited from class com.jillesvangurp.eskotlinwrapper.JacksonModelReaderAndWriter
deserialize, deserialize, serialize
-
Methods inherited from class com.jillesvangurp.eskotlinwrapper.ModelReaderAndWriter
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
deserializer
Function1<ByteArray, T> deserializer()
-
serializer
Function1<T, ByteArray> serializer()
-
getObjectMapper
final ObjectMapper getObjectMapper()
-
-
-
-