com.esotericsoftware.kryo.serializers
Class FieldSerializer.CachedField<X>
java.lang.Object
com.esotericsoftware.kryo.serializers.FieldSerializer.CachedField<X>
- Enclosing class:
- FieldSerializer<T>
public abstract class FieldSerializer.CachedField<X>
- extends java.lang.Object
Controls how a field will be serialized.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FieldSerializer.CachedField
public FieldSerializer.CachedField()
setClass
public void setClass(java.lang.Class valueClass)
- Parameters:
valueClass
- The concrete class of the values for this field. This saves 1-2 bytes. The serializer registered for the
specified class will be used. Only set to a non-null value if the field type in the class definition is final
or the values for this field will not vary.
setClass
public void setClass(java.lang.Class valueClass,
Serializer serializer)
- Parameters:
valueClass
- The concrete class of the values for this field. This saves 1-2 bytes. Only set to a non-null value if
the field type in the class definition is final or the values for this field will not vary.
setSerializer
public void setSerializer(Serializer serializer)
setCanBeNull
public void setCanBeNull(boolean canBeNull)
getField
public java.lang.reflect.Field getField()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
write
public abstract void write(Output output,
java.lang.Object object)
read
public abstract void read(Input input,
java.lang.Object object)
copy
public abstract void copy(java.lang.Object original,
java.lang.Object copy)