public class UnmodifiableListSerializer
extends com.esotericsoftware.kryo.Serializer<T>
Serializer
for unmodifiable lists created via Collections.unmodifiableList(List)
.
Note: This serializer does not support cyclic references, so if one of the objects gets set the list as attribute this might cause an error during deserialization.
Constructor and Description |
---|
UnmodifiableListSerializer() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.reflect.Field |
getInnerField() |
protected java.util.List<?> |
newInstance(java.util.List<?> l) |
T |
read(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Input input,
java.lang.Class<T> type) |
static IKryoRegistrar |
registrar() |
void |
write(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Output output,
T object) |
public static IKryoRegistrar registrar()
protected java.lang.reflect.Field getInnerField() throws java.lang.Exception
java.lang.Exception
protected java.util.List<?> newInstance(java.util.List<?> l)
public T read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, java.lang.Class<T> type)
read
in class com.esotericsoftware.kryo.Serializer<T>
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, T object)
write
in class com.esotericsoftware.kryo.Serializer<T>