Class InitializationParentAnnotatedTypeFactory.CommitmentTreeAnnotator

    • Field Summary

      • Fields inherited from class com.sun.source.util.SimpleTreeVisitor

        DEFAULT_VALUE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Void visitBinary​(com.sun.source.tree.BinaryTree tree, AnnotatedTypeMirror type)
      When overriding this method, getAnnotatedType on the left and right operands should only be called when absolutely necessary.
      java.lang.Void visitLiteral​(com.sun.source.tree.LiteralTree tree, AnnotatedTypeMirror type)  
      java.lang.Void visitMemberSelect​(com.sun.source.tree.MemberSelectTree tree, AnnotatedTypeMirror annotatedTypeMirror)  
      java.lang.Void visitMethod​(com.sun.source.tree.MethodTree tree, AnnotatedTypeMirror p)
      This method is not called when checking a method invocation against its declaration.
      java.lang.Void visitNewArray​(com.sun.source.tree.NewArrayTree tree, AnnotatedTypeMirror type)  
      java.lang.Void visitNewClass​(com.sun.source.tree.NewClassTree tree, AnnotatedTypeMirror p)  
      java.lang.Void visitUnary​(com.sun.source.tree.UnaryTree tree, AnnotatedTypeMirror type)  
      • Methods inherited from class org.checkerframework.framework.type.treeannotator.TreeAnnotator

        log
      • Methods inherited from class com.sun.source.util.SimpleTreeVisitor

        defaultAction, visit, visit, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitMemberReference, visitMethodInvocation, visitModifiers, visitModule, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeParameter, visitUnionType, visitUses, visitVariable, visitWhileLoop, visitWildcard
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommitmentTreeAnnotator

        public CommitmentTreeAnnotator​(InitializationParentAnnotatedTypeFactory initializationAnnotatedTypeFactory)
        Creates a new CommitmentTreeAnnotator.
        Parameters:
        initializationAnnotatedTypeFactory - this factory
    • Method Detail

      • visitMethod

        public java.lang.Void visitMethod​(com.sun.source.tree.MethodTree tree,
                                          AnnotatedTypeMirror p)
        Description copied from class: TreeAnnotator
        This method is not called when checking a method invocation against its declaration. So, instead of overriding this method, override TypeAnnotator.visitExecutable. TypeAnnotator.visitExecutable is called both when checking method declarations and method invocations.
        Specified by:
        visitMethod in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​AnnotatedTypeMirror>
        Overrides:
        visitMethod in class TreeAnnotator
        See Also:
        TypeAnnotator
      • visitNewClass

        public java.lang.Void visitNewClass​(com.sun.source.tree.NewClassTree tree,
                                            AnnotatedTypeMirror p)
        Specified by:
        visitNewClass in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​AnnotatedTypeMirror>
        Overrides:
        visitNewClass in class com.sun.source.util.SimpleTreeVisitor<java.lang.Void,​AnnotatedTypeMirror>
      • visitLiteral

        public java.lang.Void visitLiteral​(com.sun.source.tree.LiteralTree tree,
                                           AnnotatedTypeMirror type)
        Specified by:
        visitLiteral in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​AnnotatedTypeMirror>
        Overrides:
        visitLiteral in class com.sun.source.util.SimpleTreeVisitor<java.lang.Void,​AnnotatedTypeMirror>
      • visitMemberSelect

        public java.lang.Void visitMemberSelect​(com.sun.source.tree.MemberSelectTree tree,
                                                AnnotatedTypeMirror annotatedTypeMirror)
        Specified by:
        visitMemberSelect in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​AnnotatedTypeMirror>
        Overrides:
        visitMemberSelect in class com.sun.source.util.SimpleTreeVisitor<java.lang.Void,​AnnotatedTypeMirror>
      • visitBinary

        public java.lang.Void visitBinary​(com.sun.source.tree.BinaryTree tree,
                                          AnnotatedTypeMirror type)
        Description copied from class: TreeAnnotator
        When overriding this method, getAnnotatedType on the left and right operands should only be called when absolutely necessary. Otherwise, the checker will be very slow on heavily nested binary trees. (For example, a + b + c + d + e + f + g + h.)

        If a checker's performance is still too slow, the types of binary trees could be computed in a subclass of CFTransfer. When computing the types in a transfer, look up the value in the store rather than the AnnotatedTypeFactory. Then this method should annotate binary trees with top so that the type applied in the transfer is always a subtype of the type the AnnotatedTypeFactory computes.

        Specified by:
        visitBinary in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​AnnotatedTypeMirror>
        Overrides:
        visitBinary in class PropagationTreeAnnotator