Class TypeOutputtingChecker.Visitor

  • All Implemented Interfaces:
    com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
    Enclosing class:
    TypeOutputtingChecker

    public static class TypeOutputtingChecker.Visitor
    extends BaseTypeVisitor<GenericAnnotatedTypeFactory<?,​?,​?,​?>>
    Prints the types of the class and all of its enclosing fields, methods, and inner classes.
    • 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<GenericAnnotatedTypeFactory<?,​?,​?,​?>>
      • visitVariable

        public java.lang.Void visitVariable​(com.sun.source.tree.VariableTree tree,
                                            java.lang.Void p)
        Specified by:
        visitVariable in interface com.sun.source.tree.TreeVisitor<java.lang.Void,​java.lang.Void>
        Overrides:
        visitVariable in class BaseTypeVisitor<GenericAnnotatedTypeFactory<?,​?,​?,​?>>