public interface TranslatorFactory<T>
A translator knows how to load an entity Node subgraph into a POJO object. When an entity class is registered, the known TranslatorFactories are queried to produce Translator objects for each field. These translators are permanently associated with the entity metadata so they do not need to be discovered at normal runtime.
Translators are composed of other translators; through a chain of these a whole entity
object is assembled or disassembled. Factories can use CreateContext.getFactory().getTranslators()
to create these nested translator instances for component types.
Modifier and Type | Method and Description |
---|---|
Translator<T> |
create(Path path,
Property property,
Type type,
CreateContext ctx) |
Translator<T> create(Path path, Property property, Type type, CreateContext ctx)
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 © 2014. All rights reserved.