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() |
Modifier and Type | Method and Description |
---|---|
DefaultVariableSerializers |
addSerializer(TypedValueSerializer<?> serializer) |
DefaultVariableSerializers |
addSerializer(TypedValueSerializer<?> serializer,
int index)
Add type at the given index.
|
TypedValueSerializer<?> |
findSerializerForValue(TypedValue value)
Selects the
TypedValueSerializer which should be used for persisting a VariableValue. |
TypedValueSerializer<?> |
getSerializerByName(String serializerName) |
int |
getSerializerIndex(TypedValueSerializer<?> serializer) |
int |
getSerializerIndexByName(String serializerName) |
VariableSerializers |
removeSerializer(TypedValueSerializer<?> serializer) |
void |
setSerializerList(List<TypedValueSerializer<?>> serializerList) |
protected List<TypedValueSerializer<?>> serializerList
protected Map<String,TypedValueSerializer<?>> serializerMap
public TypedValueSerializer<?> getSerializerByName(String serializerName)
getSerializerByName
in interface VariableSerializers
public TypedValueSerializer<?> findSerializerForValue(TypedValue value)
VariableSerializers
TypedValueSerializer
which should be used for persisting a VariableValue.findSerializerForValue
in interface VariableSerializers
value
- the value to persistpublic 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
Copyright © 2018. All rights reserved.