public final class SerializingCopier<T> extends ReadWriteCopier<T>
serialization
.Constructor and Description |
---|
SerializingCopier(Serializer<T> serializer)
Creates a new copier that will using the provided
Serializer . |
Modifier and Type | Method and Description |
---|---|
static <T> java.lang.Class<? extends Copier<T>> |
asCopierClass()
Convenience method allowing to represent this copier's class as the expected type in configuration.
|
T |
copy(T obj)
Returns a copy of the passed in instance by serializing and deserializing it.
|
Serializer<T> |
getSerializer()
Returns the
Serializer used by this copier. |
copyForRead, copyForWrite
public SerializingCopier(Serializer<T> serializer)
Serializer
.serializer
- the serializer to usepublic static <T> java.lang.Class<? extends Copier<T>> asCopierClass()
T
- The type to work onpublic T copy(T obj)
copy
in class ReadWriteCopier<T>
obj
- the instance to copypublic Serializer<T> getSerializer()
Serializer
used by this copier.