Interface EnumTranslationConfiguration

All Known Implementing Classes:
EnumTranslator

public interface EnumTranslationConfiguration
Configuration options for enum value translation.
Since:
2.4
Author:
Oliver Gierke
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setEnableDefaultTranslation(boolean enableDefaultTranslation)
    Configures whether the default translation of enum names shall be applied.
    void
    setParseEnumNameAsFallback(boolean parseEnumNameAsFallback)
    Configures whether to always accept the raw enum name when parsing.
  • Method Details

    • setEnableDefaultTranslation

      void setEnableDefaultTranslation(boolean enableDefaultTranslation)
      Configures whether the default translation of enum names shall be applied. Defaults to true. This means the configuration will turn enum names into human friendly Strings and also parse them if - only if - no explicit translation is available.
      Parameters:
      enableDefaultTranslation - whether to enable the default translation of enum names.
    • setParseEnumNameAsFallback

      void setParseEnumNameAsFallback(boolean parseEnumNameAsFallback)
      Configures whether to always accept the raw enum name when parsing. This is useful if clients were used to send the Java enum names shall not be broken even if on the serialization side enum translation is activated.
      Parameters:
      parseEnumNameAsFallback - whether to parse the raw enum value as fallback, even if an explicit translation is available.