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.String
getBaseName()
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.String
getEnumTypeAsStr()
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:IMessageKeyVerifier
Get the of enum type that this verifier is related to to.- Specified by:
getEnumType
in interfaceIMessageKeyVerifier
- Returns:
-
getEnumTypeAsStr
public java.lang.String 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:
-
verify
public java.util.List<Cal10nError> verify(java.util.Locale locale)
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
- Returns:
-
typeIsolatedVerify
public java.util.List<java.lang.String> typeIsolatedVerify(java.util.Locale locale)
Description copied from interface:IMessageKeyVerifier
Same asIMessageKeyVerifier.verify(Locale)
except that the return type is List. - Specified by:
typeIsolatedVerify
in interfaceIMessageKeyVerifier
- Returns:
-
verifyAllLocales
public java.util.List<Cal10nError> verifyAllLocales()
Verify all declared locales in one step.- Specified by:
verifyAllLocales
in interfaceIMessageKeyVerifier
- Returns:
-
getLocaleNames
public java.lang.String[] getLocaleNames()
Description copied from interface:IMessageKeyVerifier
Get the locales specified in the enumType (via annotations)- Specified by:
getLocaleNames
in interfaceIMessageKeyVerifier
- Returns:
-
getBaseName
public java.lang.String 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:
-
-