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

      Required Elements 
      Modifier and Type Required Element Description
      Class<? extends TranslatorFactory<?,​?>> value
      Factory class which will be applied to this field.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean early
      If true, the factory will be placed early in the chain, before collection translators.
    • Element Detail

      • value

        Class<? extends TranslatorFactory<?,​?>> value
        Factory 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 early
        If 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