@TypeQualifiers(value={Interned.class,UnknownInterned.class,PolyInterned.class,PolyAll.class}) @SupportedLintOptions(value="dotequals") @SupportedOptions(value="checkclass") public final class InterningChecker extends BaseTypeChecker
Interned
qualifier that
finds (and verifies the absence of) equality-testing and interning errors.
The Interned
annotation indicates that a variable
refers to the canonical instance of an object, meaning that it is safe to
compare that object using the "==" operator. This plugin warns whenever
"==" is used in cases where one or both operands are not
Interned
. Optionally, it suggests using "=="
instead of ".equals" where possible.
SourceChecker.CheckerError
currentPath, currentRoot, DETAILS_SEPARATOR, messager, messages, MSGS_FILE, trees, visitor
Constructor and Description |
---|
InterningChecker() |
createSourceVisitor, getSupportedLintOptions, invokeConstructorFor
addOptions, createSupportedLintOptions, errorAbort, errorAbort, expandCFOptions, formatStackTrace, fullMessageOf, getLintOption, getLintOption, getMessages, getOption, getOption, getOptions, getProcessingEnvironment, getProperties, getStandardSuppressWarningsKeys, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKeys, hasOption, initChecker, message, printStats, report, setLintOption, setSupportedLintOptions, shouldAddShutdownHook, shouldSkipDefs, shouldSkipDefs, shouldSkipUses, shouldSkipUses, shutdownHook, treeToFilePositionString, typeProcess, typeProcessingStart
init, process, typeProcessingOver