public class MapifyTranslatorFactory extends Object implements TranslatorFactory<Map<Object,Object>>
This takes a collection and converts it to a map by letting you select out the key value using a class of your own devising. All the rules for collections normally apply (ie, you can't have collections inside of collections) but otherwise this works just like a map. The values will be written to the collection, not the keys.
Modifier and Type | Class and Description |
---|---|
static class |
MapifyTranslatorFactory.MapifyListNodeTranslator |
Constructor and Description |
---|
MapifyTranslatorFactory() |
public Translator<Map<Object,Object>> create(Path path, Property property, Type type, CreateContext ctx)
create
in interface TranslatorFactory<Map<Object,Object>>
path
- current path to this part of the tree, important for logging and exceptionsproperty
- is the property we are inspecting to create a translator fortype
- is the generic type of the field (or field component). For example, examining a field of type
ListCopyright © 2013. All Rights Reserved.