com.sun.source.util

## Class DocTreePathScanner<R,P>

- java.lang.Object
- - com.sun.source.util.DocTreeScanner<R,P>
  - - com.sun.source.util.DocTreePathScanner<R,P>

- All Implemented Interfaces:
    DocTreeVisitor<R,P>

      @Exported
      public class DocTreePathScanner<R,P>
      extends DocTreeScanner<R,P>

  A DocTreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes. To visit nodes of a particular type, just override the corresponding visitorXYZ method. Inside your method, call super.visitXYZ to visit descendant nodes.
  Since:
    1.8

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DocTreePathScanner()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DocTreePath` | `getCurrentPath()` Get the current path for the node, as built up by the currently active set of scan calls.
    `R` | `scan(DocTree tree, P p)` Scan a single node.
    `R` | `scan(DocTreePath path, P p)` Scan a tree from a position identified by a TreePath.

    - ### Methods inherited from class com.sun.source.util.DocTreeScanner

      `reduce, scan, visitAttribute, visitAuthor, visitComment, visitDeprecated, visitDocComment, visitDocRoot, visitEndElement, visitEntity, visitErroneous, visitIdentifier, visitInheritDoc, visitLink, visitLiteral, visitOther, visitParam, visitReference, visitReturn, visitSee, visitSerial, visitSerialData, visitSerialField, visitSince, visitStartElement, visitText, visitThrows, visitUnknownBlockTag, visitUnknownInlineTag, visitValue, visitVersion`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DocTreePathScanner

          public DocTreePathScanner()

  - ### Method Detail

    - #### scan

          public R scan(DocTreePath path,
                        P p)

      Scan a tree from a position identified by a TreePath.

    - #### scan

          public R scan(DocTree tree,
                        P p)

      Scan a single node. The current path is updated for the duration of the scan.
      Overrides:
        `scan` in class `DocTreeScanner<R,P>`

    - #### getCurrentPath

          public DocTreePath getCurrentPath()

      Get the current path for the node, as built up by the currently active set of scan calls.

Copyright © 2005, 2015, Oracle and/or its affiliates. All rights reserved.