Class ReportVisitor

    • Constructor Detail

    • Method Detail

      • visitMethod

        public java.lang.Void visitMethod​(com.sun.source.tree.MethodTree tree,
                                          java.lang.Void p)
        Description copied from class: BaseTypeVisitor
        Checks that the method obeys override and subtype rules to all overridden methods. (Uses the pseudo-assignment logic to do so.)

        The override rule specifies that a method, m1, may override a method m2 only if:

        • m1 return type is a subtype of m2
        • m1 receiver type is a supertype of m2
        • m1 parameters are supertypes of corresponding m2 parameters
        Also, it issues a "missing.this" error for static method annotated receivers.
        Specified by:
        visitMethod in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
        Overrides:
        visitMethod in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
      • visitMethodInvocation

        public java.lang.Void visitMethodInvocation​(com.sun.source.tree.MethodInvocationTree tree,
                                                    java.lang.Void p)
        Description copied from class: BaseTypeVisitor
        Performs a method invocation check.

        An invocation of a method, m, on the receiver, r is valid only if:

        • passed arguments are subtypes of corresponding m parameters
        • r is a subtype of m receiver type
        • if m is generic, passed type arguments are subtypes of m type variables
        Specified by:
        visitMethodInvocation in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
        Overrides:
        visitMethodInvocation in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
      • visitMemberSelect

        public java.lang.Void visitMemberSelect​(com.sun.source.tree.MemberSelectTree tree,
                                                java.lang.Void p)
        Specified by:
        visitMemberSelect in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
        Overrides:
        visitMemberSelect in class com.sun.source.util.TreeScanner<java.lang.Void,​java.lang.Void>
      • visitIdentifier

        public java.lang.Void visitIdentifier​(com.sun.source.tree.IdentifierTree tree,
                                              java.lang.Void p)
        Specified by:
        visitIdentifier in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
        Overrides:
        visitIdentifier in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
      • visitArrayAccess

        public java.lang.Void visitArrayAccess​(com.sun.source.tree.ArrayAccessTree tree,
                                               java.lang.Void p)
        Specified by:
        visitArrayAccess in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
        Overrides:
        visitArrayAccess in class com.sun.source.util.TreeScanner<java.lang.Void,​java.lang.Void>
      • visitNewClass

        public java.lang.Void visitNewClass​(com.sun.source.tree.NewClassTree tree,
                                            java.lang.Void p)
        Description copied from class: BaseTypeVisitor
        Performs a new class invocation check.

        An invocation of a constructor, c, is valid only if:

        • passed arguments are subtypes of corresponding c parameters
        • if c is generic, passed type arguments are subtypes of c type variables
        Specified by:
        visitNewClass in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
        Overrides:
        visitNewClass in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
      • visitNewArray

        public java.lang.Void visitNewArray​(com.sun.source.tree.NewArrayTree tree,
                                            java.lang.Void p)
        Specified by:
        visitNewArray in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
        Overrides:
        visitNewArray in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
      • visitTypeCast

        public java.lang.Void visitTypeCast​(com.sun.source.tree.TypeCastTree tree,
                                            java.lang.Void p)
        Specified by:
        visitTypeCast in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
        Overrides:
        visitTypeCast in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
      • visitInstanceOf

        public java.lang.Void visitInstanceOf​(com.sun.source.tree.InstanceOfTree tree,
                                              java.lang.Void p)
        Specified by:
        visitInstanceOf in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
        Overrides:
        visitInstanceOf in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
      • visitModifiers

        public java.lang.Void visitModifiers​(com.sun.source.tree.ModifiersTree tree,
                                             java.lang.Void p)
        Specified by:
        visitModifiers in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
        Overrides:
        visitModifiers in class com.sun.source.util.TreeScanner<java.lang.Void,​java.lang.Void>