Class Navigate.VisitReachable<T>

Direct Known Subclasses:
Def2Doc3.UsedIn_Collector, Def2Xslt3, FirstCalculator, Resolver4.DistributeToResolved, Resolver4.ParseParticleGenerator
Enclosing class:
Navigate

public static class Navigate.VisitReachable<T> extends SinglePhase
Visits all definitions and their defined expressions which are reachable from given start points.

(Does not visit the expressions X in "import _ from _ ^ ( X / _)"

  • Field Details

    • todo

      final Set<Definition> todo
      Definitions still to visit.
    • done

      final Set<Definition> done
      Definitions already visited.
    • result

      T result
      Register by which the payload code can return a result.
  • Constructor Details

    • VisitReachable

      public VisitReachable()
  • Method Details

    • process

      public T process(Module mod)
      Process all definitions and expressions reachable from all definitions in the given module.
    • processPublic

      public T processPublic(Module mod)
      Process all definitions and expressions reachable from all public definitions in the given module.
    • process

      public T process(Definition def)
      Process all definitions and expressions reachable from one particular definition.
    • processAll

      protected T processAll()
      Process until no more reachable definition is unprocessed.
    • markToDo

      protected void markToDo(Definition def)
      Enter the definition into the to-do-set, if not already visitedx.
    • markToDo

      protected void markToDo(Reference ref)
      Enter the referred definition into the to-do-set, if not already visitedx.