Package ghidra.trace.database.target.visitors

# Class AncestorsRootVisitor

java.lang.Object
ghidra.trace.database.target.visitors.AncestorsRootVisitor

All Implemented Interfaces:
  `TreeTraversal.SpanIntersectingVisitor`, `TreeTraversal.Visitor`

public class AncestorsRootVisitor extends Object implements TreeTraversal.SpanIntersectingVisitor

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final PathFilter`
  `filter`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AncestorsRootVisitor(PathFilter filter)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `TraceObjectValPath`
  `composePath(TraceObjectValPath pre, TraceObjectValue value)`
  When descending in a value, what path leads to the value
  `TraceObject`
  `continueObject(TraceObjectValue value)`
  When descending in a value, the object to consider next
  `Stream<? extends TraceObjectValue>`
  `continueValues(TraceObject object, Lifespan span, TraceObjectValPath path)`
  When descending in an object, the values to consider next
  `TreeTraversal.VisitResult`
  `visitValue(TraceObjectValue value, TraceObjectValPath path)`
  Visit a value

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

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

  ### Methods inherited from interface ghidra.trace.database.target.visitors.TreeTraversal.SpanIntersectingVisitor

  `composeSpan`

- ## Field Details

  - ### filter

    protected final PathFilter filter

- ## Constructor Details

  - ### AncestorsRootVisitor

    public AncestorsRootVisitor(PathFilter filter)

- ## Method Details

  - ### composePath

    public TraceObjectValPath composePath(TraceObjectValPath pre, TraceObjectValue value)
    Description copied from interface: `TreeTraversal.Visitor`
    When descending in a value, what path leads to the value

    This is usually `TraceObjectValPath.append(TraceObjectValue)` or `TraceObjectValPath.prepend(TraceObjectValue)`.

    Specified by:
      `composePath` in interface `TreeTraversal.Visitor`
    Parameters:
      `pre` - the path from seed to the but excluding the current value
      `value` - the path from seed to the and including the current value
    Returns:
      the path from seed to and including the current value

  - ### visitValue

    public TreeTraversal.VisitResult visitValue(TraceObjectValue value, TraceObjectValPath path)
    Description copied from interface: `TreeTraversal.Visitor`
    Visit a value

    Note that the path is the composed path, so it will likely have the current value at its beginning or end.

    Specified by:
      `visitValue` in interface `TreeTraversal.Visitor`
    Parameters:
      `value` - the current value
      `path` - the path from seed to value
    Returns:
      directions for how traversal should proceed

  - ### continueObject

    public TraceObject continueObject(TraceObjectValue value)
    Description copied from interface: `TreeTraversal.Visitor`
    When descending in a value, the object to consider next

    This is usually `TraceObjectValue.getChild()` or `TraceObjectValue.getParent()`.

    Specified by:
      `continueObject` in interface `TreeTraversal.Visitor`
    Parameters:
      `value` - the current value
    Returns:
      the next object

  - ### continueValues

    public Stream<? extends TraceObjectValue> continueValues(TraceObject object, Lifespan span, TraceObjectValPath path)
    Description copied from interface: `TreeTraversal.Visitor`
    When descending in an object, the values to consider next
    Specified by:
      `continueValues` in interface `TreeTraversal.Visitor`
    Parameters:
      `object` - the current object
      `span` - the composed span of values from seed to the current object
      `path` - the path from seed to the current object
    Returns:
      the next values