public class DefaultVariableSerializers extends Object implements Serializable, VariableSerializers
Modifier and Type | Field and Description |
---|---|
protected List<TypedValueSerializer<?>> |
serializerList |
protected Map<String,TypedValueSerializer<?>> |
serializerMap |
Constructor and Description |
---|
DefaultVariableSerializers() |
DefaultVariableSerializers(DefaultVariableSerializers serializers) |
protected List<TypedValueSerializer<?>> serializerList
protected Map<String,TypedValueSerializer<?>> serializerMap
public DefaultVariableSerializers()
public DefaultVariableSerializers(DefaultVariableSerializers serializers)
public TypedValueSerializer<?> getSerializerByName(String serializerName)
getSerializerByName
in interface VariableSerializers
public TypedValueSerializer<?> findSerializerForValue(TypedValue value, VariableSerializerFactory fallBackSerializerFactory)
VariableSerializers
TypedValueSerializer
which should be used for persisting a VariableValue.findSerializerForValue
in interface VariableSerializers
value
- the value to persistfallBackSerializerFactory
- a factory to build a fallback serializer in case no suiting serializer
can be determined. If this factory is not able to build serializer either, an exception is thrown. May be nullpublic TypedValueSerializer<?> findSerializerForValue(TypedValue value)
VariableSerializers
VariableSerializers.findSerializerForValue(TypedValue, VariableSerializerFactory)
with no fallback serializer factory.findSerializerForValue
in interface VariableSerializers
public DefaultVariableSerializers addSerializer(TypedValueSerializer<?> serializer)
addSerializer
in interface VariableSerializers
public DefaultVariableSerializers addSerializer(TypedValueSerializer<?> serializer, int index)
VariableSerializers
addSerializer
in interface VariableSerializers
public void setSerializerList(List<TypedValueSerializer<?>> serializerList)
public int getSerializerIndex(TypedValueSerializer<?> serializer)
getSerializerIndex
in interface VariableSerializers
public int getSerializerIndexByName(String serializerName)
getSerializerIndexByName
in interface VariableSerializers
public VariableSerializers removeSerializer(TypedValueSerializer<?> serializer)
removeSerializer
in interface VariableSerializers
public VariableSerializers join(VariableSerializers other)
VariableSerializers
VariableSerializers
instances into one. Implementations may apply
different merging strategies.join
in interface VariableSerializers
public List<TypedValueSerializer<?>> getSerializers()
VariableSerializers
getSerializers
in interface VariableSerializers
Copyright © 2022. All rights reserved.