Class AbstractMessageKeyVerifier

  • All Implemented Interfaces:
    IMessageKeyVerifier
    Direct Known Subclasses:
    MessageKeyVerifier, MessageKeyVerifierByTypeElement

    public abstract class AbstractMessageKeyVerifier
    extends java.lang.Object
    implements IMessageKeyVerifier
    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
    • Field Detail

      • enumTypeAsStr

        final java.lang.String enumTypeAsStr
    • Constructor Detail

      • AbstractMessageKeyVerifier

        protected AbstractMessageKeyVerifier​(java.lang.String enumTypeAsStr,
                                             AnnotationExtractor annotationExtractor)
    • Method Detail

      • extractCharsetForLocale

        protected java.lang.String extractCharsetForLocale​(java.util.Locale locale)
      • extractKeysInEnum

        protected abstract java.util.List<java.lang.String> extractKeysInEnum()
      • 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 interface IMessageKeyVerifier
        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 interface IMessageKeyVerifier
        Returns:
      • getResourceBundleFinder

        protected abstract CAL10NBundleFinder getResourceBundleFinder()
      • buildKeySetFromEnumeration

        protected java.util.Set<java.lang.String> buildKeySetFromEnumeration​(java.util.Enumeration<java.lang.String> e)