public final class InterningVisitor extends BaseTypeVisitor<InterningAnnotatedTypeFactory>
Interned or InternedDistinct. This visitor reports errors or
 warnings for violations for the following cases:
 BaseTypeVisitorBaseTypeVisitor.OverrideCheckeratypeFactory, checker, contractsUtils, positions, TARGET, targetValueElement, typeValidator, visitorStateelements, root, trees, treesWithSuppressWarnings, types| Constructor and Description | 
|---|
| InterningVisitor(BaseTypeChecker checker)Create an InterningVisitor. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | checkConstructorResult(AnnotatedTypeMirror.AnnotatedExecutableType constructorType,
                      ExecutableElement constructorElement)Issue a warning if the result type of the constructor is not top. | 
| protected boolean | isTypeCastSafe(AnnotatedTypeMirror castType,
              AnnotatedTypeMirror exprType)Returns true if the cast is safe. | 
| void | processClassTree(ClassTree classTree)Method to implement the @UsesObjectEquals functionality. | 
| boolean | validateTypeOf(Tree tree)Tests whether the tree expressed by the passed type tree is a valid type, and emits an error
 if that is not the case (e.g. | 
| Void | visitBinary(BinaryTree node,
           Void p)Checks comparison operators, == and !=, for INTERNING violations. | 
| Void | visitMethodInvocation(MethodInvocationTree node,
                     Void p)If lint option "dotequals" is specified, warn if the .equals method is used where reference
 equality is safe. | 
checkAccess, checkArguments, checkArrayInitialization, checkConditionalPostcondition, checkConstructorInvocation, checkContract, checkDefaultConstructor, checkExceptionParameter, checkExtendsImplements, checkFieldInvariantDeclarations, checkMethodInvocability, checkMethodReferenceAsOverride, checkOverride, checkOverride, checkPostcondition, checkPreconditions, checkPurity, checkQualifierParameter, checkSuperConstructorCall, checkThisConstructorCall, checkThisOrSuperConstructorCall, checkThrownExpression, checkTypeArguments, checkTypecastRedundancy, checkTypecastSafety, checkVarargs, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheckEndDiagnostic, commonAssignmentCheckEndDiagnostic, commonAssignmentCheckStartDiagnostic, createOverrideChecker, createTypeFactory, createTypeValidator, enclosingMemberSelect, enclosingStatement, getExceptionParameterLowerBoundAnnotations, getThrowUpperBoundAnnotations, getTypeFactory, isAccessAllowed, isValidUse, isValidUse, isValidUse, reportMethodInvocabilityError, reportPurityErrors, scan, setRoot, shouldSkipUses, skipReceiverSubtypeCheck, testTypevarContainment, typeCheckVectorCopyIntoArgument, validateType, visitAnnotation, visitArrayAccess, visitAssignment, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitEnhancedForLoop, visitIdentifier, visitInstanceOf, visitLambdaExpression, visitMemberReference, visitMethod, visitNewArray, visitNewClass, visitReturn, visitThrow, visitTypeCast, visitTypeParameter, visitUnary, visitVariablevisitgetCurrentPath, scanreduce, scan, visitAnnotatedType, visitArrayType, visitAssert, visitBlock, visitBreak, visitCase, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitIf, visitImport, visitIntersectionType, visitLabeledStatement, visitLiteral, visitMemberSelect, visitModifiers, visitModule, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitProvides, visitRequires, visitSwitch, visitSynchronized, visitTry, visitUnionType, visitUses, visitWhileLoop, visitWildcardpublic InterningVisitor(BaseTypeChecker checker)
public Void visitBinary(BinaryTree node, Void p)
visitBinary in interface TreeVisitor<Void,Void>visitBinary in class TreeScanner<Void,Void>public Void visitMethodInvocation(MethodInvocationTree node, Void p)
visitMethodInvocation in interface TreeVisitor<Void,Void>visitMethodInvocation in class BaseTypeVisitor<InterningAnnotatedTypeFactory>public void processClassTree(ClassTree classTree)
processClassTree in class BaseTypeVisitor<InterningAnnotatedTypeFactory>classTree - class to checkSourceVisitor.visitClass(com.sun.source.tree.ClassTree,
     java.lang.Object)protected void checkConstructorResult(AnnotatedTypeMirror.AnnotatedExecutableType constructorType, ExecutableElement constructorElement)
BaseTypeVisitorBaseTypeVisitor.isValidUse(AnnotatedTypeMirror.AnnotatedDeclaredType,AnnotatedTypeMirror.AnnotatedDeclaredType,Tree).checkConstructorResult in class BaseTypeVisitor<InterningAnnotatedTypeFactory>constructorType - AnnotatedExecutableType for the constructorconstructorElement - element that declares the constructorpublic boolean validateTypeOf(Tree tree)
BaseTypeVisitorvalidateTypeOf in class BaseTypeVisitor<InterningAnnotatedTypeFactory>tree - the AST type supplied by the userprotected boolean isTypeCastSafe(AnnotatedTypeMirror castType, AnnotatedTypeMirror exprType)
BaseTypeVisitorOnly primary qualifiers are checked unless the command line option "checkCastElementType" is supplied.
isTypeCastSafe in class BaseTypeVisitor<InterningAnnotatedTypeFactory>castType - annotated type of the castexprType - annotated type of the casted expression