-
-
Notifications
You must be signed in to change notification settings - Fork 78
Object Mapper
Connor (Vectrix) edited this page May 15, 2017
·
15 revisions
Can only create objects that have no-arg constructor, otherwise restricted to populating already existing objects
- String, float, double, int, long, byte, char
- Maps
- Lists
- URIs
- URLs
- Objects annotated with
@ConfigSerializable(which are loaded from the object mapper) - Enum values
Other supported types may be added by registering custom TypeSerializers, explained below.
TypeSerializers.getDefaultSerializers().registerType(TypeToken, TypeSerializer) with custom implementations of TypeSerializer. Newly registered serializers are added with highest priority.
collectFields(Map<String, FieldData> fields, Class<? super T> clazz): To control how fields that are settings are discovered from a class
constructObject(): To control how the object is created