checkers.interning
Class InterningChecker
java.lang.Object
javax.annotation.processing.AbstractProcessor
com.sun.source.util.AbstractTypeProcessor
checkers.source.SourceChecker
checkers.basetype.BaseTypeChecker
checkers.interning.InterningChecker
- All Implemented Interfaces:
- Processor
@TypeQualifiers(value={Interned.class,PolyInterned.class})
@SupportedLintOptions(value="dotequals")
public final class InterningChecker
- 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:
- Interning 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, report, shouldSkip, typeProcess |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InterningChecker
public InterningChecker()