Package ch.qos.cal10n.verifier
Class AbstractMessageKeyVerifier
java.lang.Object
ch.qos.cal10n.verifier.AbstractMessageKeyVerifier
- All Implemented Interfaces:
IMessageKeyVerifier
- Direct Known Subclasses:
MessageKeyVerifier
,MessageKeyVerifierByTypeElement
Abstract class for verifying that for a given an enum type, the keys match those
found in the corresponding resource bundles.
This class contains the bundle verification logic. Logic for extracting locate and key information should be provided by derived classes.
- Since:
- 0.8
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractMessageKeyVerifier
(String enumTypeAsStr, AnnotationExtractor annotationExtractor) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
extractCharsetForLocale
(Locale locale) Get the base name for the resource bundle family as specified in the enumType (via annotations)Get the name of enum type to this verifier is related to to.String[]
Get the locales specified in the enumType (via annotations)protected abstract CAL10NBundleFinder
typeIsolatedVerify
(Locale locale) Same asIMessageKeyVerifier.verify(Locale)
except that the return type is List. Verify that the keys defined in the enumClass match those found in the resource bundle corresponding to a certain localeVerify all declared locales in one step.
-
Constructor Details
-
AbstractMessageKeyVerifier
-
-
Method Details
-
getEnumTypeAsStr
Description copied from interface:IMessageKeyVerifier
Get the name of enum type to this verifier is related to to.- Specified by:
getEnumTypeAsStr
in interfaceIMessageKeyVerifier
- Returns:
-
extractCharsetForLocale
-
extractKeysInEnum
-
getLocaleNames
Description copied from interface:IMessageKeyVerifier
Get the locales specified in the enumType (via annotations)- Specified by:
getLocaleNames
in interfaceIMessageKeyVerifier
- Returns:
-
getBaseName
Description copied from interface:IMessageKeyVerifier
Get the base name for the resource bundle family as specified in the enumType (via annotations)- Specified by:
getBaseName
in interfaceIMessageKeyVerifier
- Returns:
-
verify
Description copied from interface:IMessageKeyVerifier
Verify that the keys defined in the enumClass match those found in the resource bundle corresponding to a certain locale- Specified by:
verify
in interfaceIMessageKeyVerifier
- Parameters:
locale
-- Returns:
-
getResourceBundleFinder
-
typeIsolatedVerify
Description copied from interface:IMessageKeyVerifier
Same asIMessageKeyVerifier.verify(Locale)
except that the return type is List. - Specified by:
typeIsolatedVerify
in interfaceIMessageKeyVerifier
- Parameters:
locale
-- Returns:
-
buildKeySetFromEnumeration
-
verifyAllLocales
Verify all declared locales in one step.- Specified by:
verifyAllLocales
in interfaceIMessageKeyVerifier
- Returns:
-