org.simantics.databoard.serialization
Class SerializerFactory
java.lang.Object
org.simantics.databoard.serialization.SerializerFactory
- All Implemented Interfaces:
- SerializerScheme
- Direct Known Subclasses:
- DefaultSerializerFactory
public abstract class SerializerFactory
- extends java.lang.Object
- implements SerializerScheme
- Author:
- Toni Kalajainen
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SerializerFactory
public SerializerFactory()
- Construct a new serializer.
SerializerFactory
public SerializerFactory(java.util.Map<Binding,Serializer> repository)
- Construct a new serializer factory that places constructed serializers
into user given repository.
- Parameters:
repository
-
getRepository
public java.util.Map<Binding,Serializer> getRepository()
construct
public Serializer construct(Binding request)
throws SerializerConstructionException
- Throws:
SerializerConstructionException
getSerializer
public Serializer getSerializer(Binding binding)
throws SerializerConstructionException
- Description copied from interface:
SerializerScheme
- Get binding of a data type
- Specified by:
getSerializer
in interface SerializerScheme
- Returns:
- binding
- Throws:
SerializerConstructionException
- if data type is not supported
getSerializerUnchecked
public Serializer getSerializerUnchecked(Binding binding)
throws RuntimeSerializerConstructionException
- Description copied from interface:
SerializerScheme
- Get binding of a data type
- Specified by:
getSerializerUnchecked
in interface SerializerScheme
- Returns:
- binding
- Throws:
RuntimeSerializerConstructionException
- if data type is not supported