Class LocalizableKeyChecker
java.lang.Object
javax.annotation.processing.AbstractProcessor
org.checkerframework.javacutil.AbstractTypeProcessor
org.checkerframework.framework.source.SourceChecker
org.checkerframework.common.basetype.BaseTypeChecker
org.checkerframework.checker.propkey.PropertyKeyChecker
org.checkerframework.checker.i18n.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:
- 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 propfilesoption (e.g.-Apropfiles=/path/to/messages.properties), separating multiple files byFile.pathSeparator.
- ResourceBundle: The proper recommended mechanism for localization. Programmers pass the- baseNamename of the bundle via- bundlename(e.g.- -Abundlename=MyResource. The checker uses the resource associated with the default- Localein the compilation system.
- 
Field SummaryFields inherited from class org.checkerframework.framework.source.SourceCheckercurrentRoot, DETAILS_SEPARATOR, elements, elementsWithSuppressedWarnings, errsOnLastExit, javacErrored, messager, messagesProperties, MSGS_FILE, OPTION_SEPARATOR, parentChecker, SUPPRESS_ALL_MESSAGE_KEY, SUPPRESS_ALL_PREFIX, trees, types, UNNEEDED_SUPPRESSION_KEY, upstreamCheckerNames, useAllcheckersPrefix, visitorFields inherited from class javax.annotation.processing.AbstractProcessorprocessingEnv
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class org.checkerframework.common.basetype.BaseTypeCheckercreateSourceVisitor, createSourceVisitorPublic, getAnnotationProvider, getExtraStubFiles, getImmediateSubcheckerClasses, getOptions, getOptionsNoSubcheckers, getRelatedClassName, getSubchecker, getSubcheckers, getSupportedLintOptions, getSupportedOptions, getSuppressWarningsPrefixesOfSubcheckers, getTreePathCacher, getTypeFactory, getTypeFactoryOfSubcheckerOrNull, getUltimateParentChecker, getVisitor, hasOptionNoSubcheckers, initChecker, invokeConstructorFor, printOrStoreMessage, processErrorMessageArg, setRoot, shouldAddShutdownHook, shouldResolveReflection, shutdownHook, typeProcess, typeProcessingOver, warnUnneededSuppressionsMethods inherited from class org.checkerframework.framework.source.SourceCheckeraddOptions, createSupportedLintOptions, expandCFOptions, fullMessageOf, getBooleanOption, getBooleanOption, getElementUtils, getLintOption, getLintOption, getMessagesProperties, getOption, getOption, getOptionConfiguration, getParentChecker, getPathToCompilationUnit, getProcessingEnvironment, getProperties, getStandardSuppressWarningsPrefixes, getStringsOption, getStringsOption, getSupportedAnnotationTypes, getSupportedSourceVersion, getSuppressWarningsPrefixes, getTreeUtils, getTypeUtils, getUpstreamCheckerNames, hasOption, init, message, message, messageKeyMatches, printOrStoreMessage, printStats, report, reportError, reportWarning, setLintOption, setParentChecker, setProcessingEnvironment, setSupportedLintOptions, shouldSkipDefs, shouldSkipDefs, shouldSkipFiles, shouldSkipUses, shouldSkipUses, shouldSuppressWarnings, shouldSuppressWarnings, shouldSuppressWarnings, typeProcessingStart, useConservativeDefault, warnUnneededSuppressionsMethods inherited from class org.checkerframework.javacutil.AbstractTypeProcessorgetCompilerLog, processMethods inherited from class javax.annotation.processing.AbstractProcessorgetCompletions, isInitializedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.checkerframework.framework.util.OptionConfigurationgetStringsOption, getStringsOption
- 
Constructor Details- 
LocalizableKeyCheckerpublic LocalizableKeyChecker()
 
-