| Package | Description |
|---|---|
| net.lecousin.framework.io.serialization |
Serialization and deserialization framework.
|
| net.lecousin.framework.io.serialization.rules |
Serialization rules to customize serialization and deserialization.
|
| net.lecousin.framework.xml.serialization |
XML serialization and deserialization.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
SerializationContext.AttributeContext
The context is on an attribute of an object.
|
static class |
SerializationContext.CollectionContext
The context is on a collection.
|
static class |
SerializationContext.ObjectContext
The context is on an object.
|
| Modifier and Type | Field and Description |
|---|---|
protected SerializationContext |
SerializationContext.parent |
| Modifier and Type | Method and Description |
|---|---|
SerializationContext |
SerializationContext.getParent() |
| Constructor and Description |
|---|
CollectionContext(SerializationContext parent,
Object col,
TypeDefinition colType,
TypeDefinition elementType)
Constructor.
|
ObjectContext(SerializationContext parent,
Object instance,
SerializationClass clazz,
TypeDefinition originalType)
Constructor.
|
SerializationContext(SerializationContext parent)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
TypeFactory.apply(SerializationClass type,
SerializationContext context,
List<SerializationRule> rules,
boolean serializing) |
boolean |
SerializationRule.apply(SerializationClass type,
SerializationContext context,
List<SerializationRule> rules,
boolean serializing)
Apply the rule to the given type, knowing the given context.
|
boolean |
RenameAttribute.apply(SerializationClass type,
SerializationContext context,
List<SerializationRule> rules,
boolean serializing) |
boolean |
MergeTypeAttributes.apply(SerializationClass type,
SerializationContext context,
List<SerializationRule> rules,
boolean serializing) |
boolean |
IgnoreAttribute.apply(SerializationClass type,
SerializationContext context,
List<SerializationRule> rules,
boolean serializing) |
boolean |
CustomTypeSerializer.apply(SerializationClass type,
SerializationContext context,
List<SerializationRule> rules,
boolean serializing) |
boolean |
CustomAttributeSerializer.apply(SerializationClass type,
SerializationContext context,
List<SerializationRule> rules,
boolean serializing) |
boolean |
AttributeInstantiation.apply(SerializationClass type,
SerializationContext context,
List<SerializationRule> rules,
boolean serializing) |
boolean |
AddAttributeToType.apply(SerializationClass sc,
SerializationContext context,
List<SerializationRule> rules,
boolean serializing) |
boolean |
AbstractAttributeInstantiation.apply(SerializationClass type,
SerializationContext context,
List<SerializationRule> rules,
boolean serializing) |
boolean |
TypeFactory.canInstantiate(TypeDefinition type,
SerializationContext context) |
default boolean |
SerializationRule.canInstantiate(TypeDefinition type,
SerializationContext context)
During deserialization, when a type needs to be instantiated, this method is called to know
if this rule is providing a custom way to instantiate the given type.
|
default Object |
SerializationRule.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.
|
Object |
CustomTypeSerializer.convertSerializationValue(Object value,
TypeDefinition type,
SerializationContext context) |
default TypeDefinition |
SerializationRule.getDeserializationType(TypeDefinition type,
SerializationContext context)
Can be used to change a type during deserialization, in a similar way as the method
convertSerializationValue during serialization.
|
TypeDefinition |
CustomTypeSerializer.getDeserializationType(TypeDefinition type,
SerializationContext context) |
default Object |
SerializationRule.getDeserializationValue(Object value,
TypeDefinition type,
SerializationContext context)
Can be used to change the deserialization, in a similar way as the method
convertSerializationValue during serialization.
|
Object |
CustomTypeSerializer.getDeserializationValue(Object value,
TypeDefinition type,
SerializationContext context) |
Object |
TypeFactory.instantiate(TypeDefinition type,
SerializationContext context) |
default Object |
SerializationRule.instantiate(TypeDefinition type,
SerializationContext context)
Called if the method canInstantiate previously returned true during deserialization.
|
default void |
SerializationRule.onInstantiation(TypeDefinition type,
Object instance,
SerializationContext context)
Called each time a type is instantiated during deserialization.
|
Copyright © 2019. All rights reserved.