public final class SerializerContext
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
ConfigFormat<?> |
configFormat() |
CommentedConfig |
createCommentedConfig() |
Config |
createConfig() |
void |
serializeFields(java.lang.Object source,
Config destination)
Serializes an object as a
Config by transforming its fields into
configuration entries in destination. |
java.lang.Object |
serializeValue(java.lang.Object value)
Serializes a single value.
|
public ConfigFormat<?> configFormat()
ConfigFormatpublic Config createConfig()
Configpublic CommentedConfig createCommentedConfig()
CommentedConfigpublic java.lang.Object serializeValue(java.lang.Object value)
value - value coming from a field that we are serializingSerdeException - if no suitable serializer is foundpublic void serializeFields(java.lang.Object source,
Config destination)
Config by transforming its fields into
configuration entries in destination.source - the object that we are serializingdestination - the config that we are modifying (result of the serialization)