Class PropertyKeyChecker

All Implemented Interfaces:
Processor, OptionConfiguration
Direct Known Subclasses:
CompilerMessagesChecker, LocalizableKeyChecker

@SupportedOptions({"propfiles","bundlenames"}) @RelevantJavaTypes(java.lang.CharSequence.class) public class PropertyKeyChecker extends BaseTypeChecker
A type-checker that checks that only valid keys are used to access property files and resource bundles. Subclasses can specialize this class for the different uses of property files, for examples see the I18n Checker and Compiler Messages Checker.

Currently, the checker supports two methods to check:

  1. Property files: A common method for localization using a property file, mapping the keys to values. Programmers pass the property file locations via propfiles option (e.g. -Apropfiles=/path/to/messages.properties), separating multiple files by File.pathSeparator.
  2. ResourceBundle: 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.
See the Checker Framework Manual:
Property File Checker
  • Constructor Details

    • PropertyKeyChecker

      public PropertyKeyChecker()