| 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 | Field and Description |
|---|---|
protected TypeDefinition |
SerializationClass.Attribute.originalType |
protected TypeDefinition |
SerializationClass.Attribute.type |
| Modifier and Type | Method and Description |
|---|---|
static TypeDefinition |
TypeDefinition.from(Class<?> instanceType,
TypeDefinition definition)
Create a type, with the given definition of a field or method, and knowing the instance type.
|
TypeDefinition |
SerializationContext.CollectionContext.getCollectionType() |
TypeDefinition |
SerializationContext.CollectionContext.getElementType() |
TypeDefinition |
SerializationContext.ObjectContext.getOriginalType() |
TypeDefinition |
SerializationClass.Attribute.getOriginalType() |
TypeDefinition |
SerializationClass.getType() |
TypeDefinition |
SerializationClass.Attribute.getType() |
static TypeDefinition |
SerializationClass.searchAttributeType(TypeDefinition containerType,
String attributeName)
Search an attribute in the given type.
|
TypeDefinition |
CustomSerializer.sourceType()
Source type.
|
TypeDefinition |
CustomSerializer.targetType()
Target type.
|
| Modifier and Type | Method and Description |
|---|---|
List<TypeDefinition> |
TypeDefinition.getParameters()
Return the generic parameters.
|
| Constructor and Description |
|---|
Attribute(SerializationClass parent,
String name,
TypeDefinition type)
Constructor.
|
CollectionContext(SerializationContext parent,
Object col,
TypeDefinition colType,
TypeDefinition elementType)
Constructor.
|
ObjectContext(SerializationContext parent,
Object instance,
SerializationClass clazz,
TypeDefinition originalType)
Constructor.
|
SerializationClass(TypeDefinition type)
Constructor.
|
TypeDefinition(Class<?> base,
TypeDefinition... parameters)
Create a type of the given class and generic parameters.
|
TypeDefinition(TypeDefinition containerType,
Type type)
Create from the given type which is the type of an attribute or a method, knowing its container type.
|
| Constructor and Description |
|---|
TypeDefinition(Class<?> base,
List<TypeDefinition> parameters)
Create a type of the given class and generic parameters.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDefinition |
XMLCustomSerializer.type()
Type that this serializer is handling.
|
| Modifier and Type | Method and Description |
|---|---|
protected IAsync<SerializationException> |
XMLSpecWriter.specifyEnumValue(SerializationContext context,
TypeDefinition type) |
protected IAsync<SerializationException> |
XMLSpecWriter.specifyStringValue(SerializationContext context,
TypeDefinition type) |
protected AsyncSupplier<Object,SerializationException> |
XMLDeserializer.startObjectValue(SerializationContext context,
TypeDefinition type,
List<SerializationRule> rules) |
Copyright © 2019. All rights reserved.