Enum Class MissingKeyStrategy
- All Implemented Interfaces:
Serializable, Comparable<MissingKeyStrategy>, Constable
Strategy for handling missing i18n translation keys.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReturn the key path as the value (e.g.Return a placeholder string like "[missing: nav.home]".Throw aMissingTranslationException.Log a warning and return the key path. -
Method Summary
Modifier and TypeMethodDescriptionstatic MissingKeyStrategyReturns the enum constant of this class with the specified name.static MissingKeyStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RETURN_KEY
Return the key path as the value (e.g. "nav.home"). -
WARN_AND_RETURN_KEY
Log a warning and return the key path. -
THROW_EXCEPTION
Throw aMissingTranslationException. -
RETURN_PLACEHOLDER
Return a placeholder string like "[missing: nav.home]".
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-