checkers.interned
Class InternedChecker
java.lang.Object
javax.annotation.processing.AbstractProcessor
checkers.source.SourceChecker
checkers.basetype.BaseTypeChecker
checkers.interned.InternedChecker
- All Implemented Interfaces:
- Processor
@TypeQualifiers(value=Interned.class)
@SupportedLintOptions(value={"dotequals","flow"})
public final class InternedChecker
- extends BaseTypeChecker
A typechecker plug-in for the 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.
- See the checkers manual:
- Interned checker
Methods inherited from class checkers.basetype.BaseTypeChecker |
createFactory, createQualifierHierarchy, createSourceVisitor, createSupportedTypeQualifiers, createTypeHierarchy, getQualifierHierarchy, getSupportedLintOptions, getSupportedTypeQualifiers, init, isAssignable, isSubtype, isValidUse |
Methods inherited from class checkers.source.SourceChecker |
getLintOption, getLintOption, getMessages, getProcessingEnvironment, getShouldSkip, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKey, message, process, report, shouldSkip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InternedChecker
public InternedChecker()