Package com.esotericsoftware.kryo
Interface SerializerFactory<T extends Serializer>
-
- All Known Implementing Classes:
SerializerFactory.BaseSerializerFactory
,SerializerFactory.CompatibleFieldSerializerFactory
,SerializerFactory.FieldSerializerFactory
,SerializerFactory.ReflectionSerializerFactory
,SerializerFactory.SingletonSerializerFactory
,SerializerFactory.TaggedFieldSerializerFactory
,SerializerFactory.VersionFieldSerializerFactory
public interface SerializerFactory<T extends Serializer>
Creates and configures serializers.- Author:
- Rafael Winterhalter
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SerializerFactory.BaseSerializerFactory<T extends Serializer>
A serializer factory which always returns true forSerializerFactory.BaseSerializerFactory.isSupported(Class)
.static class
SerializerFactory.CompatibleFieldSerializerFactory
A serializer factory that returns new, configuredCompatibleFieldSerializer
instances.static class
SerializerFactory.FieldSerializerFactory
A serializer factory that returns new, configuredFieldSerializer
instances.static class
SerializerFactory.ReflectionSerializerFactory<T extends Serializer>
This factory instantiates new serializers of a given class via reflection.static class
SerializerFactory.SingletonSerializerFactory<T extends Serializer>
A serializer factory that always returns a given serializer instance rather than creating new serializer instances.static class
SerializerFactory.TaggedFieldSerializerFactory
A serializer factory that returns new, configuredTaggedFieldSerializer
instances.static class
SerializerFactory.VersionFieldSerializerFactory
A serializer factory that returns new, configuredVersionFieldSerializer
instances.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isSupported(java.lang.Class type)
Returns true if this factory can create a serializer for the specified type.T
newSerializer(Kryo kryo, java.lang.Class type)
Creates and configures a new serializer.
-
-
-
Method Detail
-
newSerializer
T newSerializer(Kryo kryo, java.lang.Class type)
Creates and configures a new serializer.- Parameters:
kryo
- The Kryo instance that will be used with the new serializer.type
- The type of the object that the serializer will serialize.
-
isSupported
boolean isSupported(java.lang.Class type)
Returns true if this factory can create a serializer for the specified type.
-
-