public class UnmodifiableCollectionSerializer
extends com.esotericsoftware.kryo.Serializer<T>
Serializer for unmodifiable collections created via Collections.unmodifiableCollection(Collection).
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 |
|---|
UnmodifiableCollectionSerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.reflect.Field |
getInnerField() |
protected java.util.Collection<?> |
newInstance(java.util.Collection<?> c) |
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.Exceptionprotected java.util.Collection<?> newInstance(java.util.Collection<?> c)
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>