Class LocalizableKeyChecker

All Implemented Interfaces:
Processor, OptionConfiguration

@SupportedOptions({"propfiles","bundlenames"}) public class LocalizableKeyChecker extends PropertyKeyChecker
A type-checker that checks that only valid localizable keys are used when using localizing methods (e.g. ResourceBundle.getString(String)).

Currently, the checker supports two methods for localization checks:

  1. Properties files: A common method for localization using a properties file, mapping the localization keys to localized messages. Programmers pass the property file location via propfiles option (e.g. -Apropfiles=/path/to/messages.properties), separating multiple files by File.pathSeparator.
  2. ResourceBundle: The proper recommended mechanism for localization. Programmers pass the baseName name of the bundle via bundlename (e.g. -Abundlename=MyResource. The checker uses the resource associated with the default Locale in the compilation system.
  • Constructor Details

    • LocalizableKeyChecker

      public LocalizableKeyChecker()