code: @Override
      public R scan(DocTree tree, P p) {
          if (tree == null)
              return null;
  
          DocTreePath prev = path;
          path = new DocTreePath(path, tree);
          try {
              return tree.accept(this, p);
          } finally {
              path = prev;
          }
      }
docs: Scans a single node.
  The current path is updated for the duration of the scan.
  @param tree the tree to be scanned
  @param p a value to be passed to visitor methods
  @return the result returned from the main visitor method