checkers.interning
Class InterningChecker

java.lang.Object
  extended by javax.annotation.processing.AbstractProcessor
      extended by com.sun.source.util.AbstractTypeProcessor
          extended by checkers.source.SourceChecker
              extended by checkers.basetype.BaseTypeChecker
                  extended by 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 Checker Framework manual:
Interning checker

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class checkers.source.SourceChecker
currentPath, currentRoot, env, messager, messages, trees
 
Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv
 
Constructor Summary
Constructor and Description
InterningChecker()
           
 
Method Summary
Modifier and Type Method and Description
 
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, typeProcess
 
Methods inherited from class com.sun.source.util.AbstractTypeProcessor
process, typeProcessingOver
 
Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, isInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterningChecker

public InterningChecker()