Enum Class TreeTraversal

java.lang.Object
java.lang.Enum<TreeTraversal>
ghidra.trace.database.target.visitors.TreeTraversal
All Implemented Interfaces:
Serializable, Comparable<TreeTraversal>, Constable

public enum TreeTraversal extends Enum<TreeTraversal>
Support for traversing a trace's object tree

Many of these are already built into the object and value interfaces. Direct use of this traversal support is only needed when performing customized traversals. In most cases, it's sufficient to use a built-in traversal and filter the resulting stream. Customized traversal is only needed when it's beneficial to prune subtrees in a way that no built-in traversal provides.

  • Enum Constant Details

    • INSTANCE

      public static final TreeTraversal INSTANCE
      The singleton instance
  • Method Details

    • values

      public static TreeTraversal[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TreeTraversal valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • walkValue

      public Stream<? extends TraceObjectValPath> walkValue(TreeTraversal.Visitor visitor, TraceObjectValue value, Lifespan span, TraceObjectValPath path)
      Walk a value and possibly its subtree
      Parameters:
      visitor - the visitor
      value - the current value
      span - the composed span from seed to but excluding the current value
      path - the path from seed to but excluding the current value
      Returns:
      the result stream of the value and subtree walked
    • walkObject

      public Stream<? extends TraceObjectValPath> walkObject(TreeTraversal.Visitor visitor, TraceObject object, Lifespan span, TraceObjectValPath path)
      Walk an object and its subtree
      Parameters:
      visitor - the visitor
      object - the current object
      span - the composed span from seed to current object
      path - the path from seed to current object
      Returns:
      the result stream of the object and subtree walked