Package ch.qos.cal10n.verifier
Class MessageKeyVerifier
- java.lang.Object
-
- ch.qos.cal10n.verifier.MessageKeyVerifier
-
- All Implemented Interfaces:
IMessageKeyVerifier
public class MessageKeyVerifier extends java.lang.Object implements IMessageKeyVerifier
Given an enum class, verify that the resource bundles corresponding to a given locale contains the correct keys.- Author:
- Ceki Gulcu
-
-
Constructor Summary
Constructors Constructor Description MessageKeyVerifier(java.lang.Class<? extends java.lang.Enum<?>> enumClass)MessageKeyVerifier(java.lang.String enumTypeAsStr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBaseName()Get the base name for the resource bundle family as specified in the enumType (via annotations)java.lang.Class<? extends java.lang.Enum<?>>getEnumType()Get the of enum type that this verifier is related to to.java.lang.StringgetEnumTypeAsStr()Get the name of enum type to this verifier is related to to.java.lang.String[]getLocaleNames()Get the locales specified in the enumType (via annotations)java.util.List<java.lang.String>typeIsolatedVerify(java.util.Locale locale)Same asIMessageKeyVerifier.verify(Locale)except that the return type is List. java.util.List<Cal10nError>verify(java.util.Locale locale)Verify that the keys defined in the enumClass match those found in the resource bundle corresponding to a certain localejava.util.List<Cal10nError>verifyAllLocales()Verify all declared locales in one step.
-
-
-
Method Detail
-
getEnumType
public java.lang.Class<? extends java.lang.Enum<?>> getEnumType()
Description copied from interface:IMessageKeyVerifierGet the of enum type that this verifier is related to to.- Specified by:
getEnumTypein interfaceIMessageKeyVerifier- Returns:
-
getEnumTypeAsStr
public java.lang.String getEnumTypeAsStr()
Description copied from interface:IMessageKeyVerifierGet the name of enum type to this verifier is related to to.- Specified by:
getEnumTypeAsStrin interfaceIMessageKeyVerifier- Returns:
-
verify
public java.util.List<Cal10nError> verify(java.util.Locale locale)
Description copied from interface:IMessageKeyVerifierVerify that the keys defined in the enumClass match those found in the resource bundle corresponding to a certain locale- Specified by:
verifyin interfaceIMessageKeyVerifier- Returns:
-
typeIsolatedVerify
public java.util.List<java.lang.String> typeIsolatedVerify(java.util.Locale locale)
Description copied from interface:IMessageKeyVerifierSame asIMessageKeyVerifier.verify(Locale)except that the return type is List. - Specified by:
typeIsolatedVerifyin interfaceIMessageKeyVerifier- Returns:
-
verifyAllLocales
public java.util.List<Cal10nError> verifyAllLocales()
Verify all declared locales in one step.- Specified by:
verifyAllLocalesin interfaceIMessageKeyVerifier- Returns:
-
getLocaleNames
public java.lang.String[] getLocaleNames()
Description copied from interface:IMessageKeyVerifierGet the locales specified in the enumType (via annotations)- Specified by:
getLocaleNamesin interfaceIMessageKeyVerifier- Returns:
-
getBaseName
public java.lang.String getBaseName()
Description copied from interface:IMessageKeyVerifierGet the base name for the resource bundle family as specified in the enumType (via annotations)- Specified by:
getBaseNamein interfaceIMessageKeyVerifier- Returns:
-
-