Enum TranslationFailureReason
- All Implemented Interfaces:
Serializable, Comparable<TranslationFailureReason>, Constable
Reasons a localized string lookup can fail.
- Since:
- 3.0.0
- Author:
- Mark Allen
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo attempted candidate locale contained the requested key.An attempted candidate locale contained the requested key, but no whole-message alternative matched and no default translation was provided.A candidate translation existed, but placeholder, expression, interpolation, or language-form resolution failed. -
Method Summary
Modifier and TypeMethodDescriptionstatic TranslationFailureReasonReturns the enum constant of this type with the specified name.static TranslationFailureReason[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
MISSING_TRANSLATION
No attempted candidate locale contained the requested key. -
NO_MATCHING_ALTERNATIVE
An attempted candidate locale contained the requested key, but no whole-message alternative matched and no default translation was provided.A
LocalizedString.ExpressionTranslationgenerated fragment cannot produce this reason: it always has a required default translation when none of its ordered alternatives matches. -
RESOLUTION_FAILURE
A candidate translation existed, but placeholder, expression, interpolation, or language-form resolution failed.This includes a failure while evaluating a reachable
expression-fragment predicateor interpolating its selected/default fragment. A selected fragment's failure does not fall through to a later predicate or its default.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-