Annotation Type Translate
@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface Translate
Lets you define a particular translator for a specific property (field or @AlsoLoad method). The translator factory must produce a translator when handed the property on which this annotation is placed.
"Early" translator factories are executed before collection translator factories and therefore can manipulate the whole collection value. Late translator factories are only responsible for translating the contents of a collection.
- Author:
- Jeff Schnitzer
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionClass<? extends TranslatorFactory<?,?>>
Factory class which will be applied to this field. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
If true, the factory will be placed early in the chain, before collection translators.
-
Element Details
-
value
Class<? extends TranslatorFactory<?,?>> valueFactory class which will be applied to this field. It will be constructed with ObjectifyFactory.construct(). It must produce a Translator for the field.
-
-
-
early
boolean earlyIf true, the factory will be placed early in the chain, before collection translators. This will let you explicitly translate collection fields rather than collection contents, which is the default.- Default:
- false
-