public class Serializers
extends java.lang.Object
Serializer
types.Constructor and Description |
---|
Serializers() |
Modifier and Type | Method and Description |
---|---|
static Serializer |
classSerializer()
Returns a new serializer for class objects.
|
static Serializer |
collectionSerializer(Serializer elementSerializer)
Returns a new serializer for collections, using the given serializer for the collection's elements.
|
static Serializer |
compositeSerializer(Serializer... children)
Returns a new composite serializer which can serialize everything that the children can serialize in combination.
|
static Serializer |
enumSerializer()
Returns a new serializer for Enum objects.
|
static Serializer |
fullSerializer()
A serializer which can serialize as much as possible.
|
static Serializer |
jsonSerializableSerializer()
Returns a new serializer for JsonSerializable objects.
|
static Serializer |
mapSerializer(Serializer elementSerializer)
Returns a new serializer for maps, using the given serializer for the map's elements.
|
static Serializer |
primitiveSerializer()
Returns a new serializer for primitives (numeric values, booleans and strings)
|
public static Serializer fullSerializer()
public static Serializer compositeSerializer(Serializer... children)
public static Serializer primitiveSerializer()
public static Serializer classSerializer()
public static Serializer jsonSerializableSerializer()
public static Serializer enumSerializer()
public static Serializer collectionSerializer(Serializer elementSerializer)
public static Serializer mapSerializer(Serializer elementSerializer)