public class CustomTypeSerializer extends Object implements SerializationRule
| Constructor and Description |
|---|
CustomTypeSerializer(CustomSerializer serializer,
SerializationContextPattern context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(SerializationClass type,
SerializationContext context,
List<SerializationRule> rules,
boolean serializing)
Apply the rule to the given type, knowing the given context.
|
Object |
convertSerializationValue(Object value,
TypeDefinition type,
SerializationContext context)
Before to serialize a value, this method is called in order to give the opportunity to convert to another value.
|
TypeDefinition |
getDeserializationType(TypeDefinition type,
SerializationContext context)
Can be used to change a type during deserialization, in a similar way as the method
convertSerializationValue during serialization.
|
Object |
getDeserializationValue(Object value,
TypeDefinition type,
SerializationContext context)
Can be used to change the deserialization, in a similar way as the method
convertSerializationValue during serialization.
|
boolean |
isEquivalent(SerializationRule rule)
Check if this rule is equivalent to the given rule.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanInstantiate, instantiate, onInstantiationpublic CustomTypeSerializer(CustomSerializer serializer, SerializationContextPattern context)
public boolean apply(SerializationClass type, SerializationContext context, List<SerializationRule> rules, boolean serializing)
SerializationRuleapply in interface SerializationRulepublic Object convertSerializationValue(Object value, TypeDefinition type, SerializationContext context) throws SerializationException
SerializationRuleconvertSerializationValue in interface SerializationRuleSerializationExceptionpublic TypeDefinition getDeserializationType(TypeDefinition type, SerializationContext context)
SerializationRulegetDeserializationType in interface SerializationRulepublic Object getDeserializationValue(Object value, TypeDefinition type, SerializationContext context) throws SerializationException
SerializationRulegetDeserializationValue in interface SerializationRuleSerializationExceptionpublic boolean isEquivalent(SerializationRule rule)
SerializationRuleisEquivalent in interface SerializationRuleCopyright © 2019. All rights reserved.