Class PathRecordingDependencyVisitor

java.lang.Object
org.eclipse.aether.util.graph.visitor.PathRecordingDependencyVisitor
All Implemented Interfaces:
org.eclipse.aether.graph.DependencyVisitor

public final class PathRecordingDependencyVisitor extends Object implements org.eclipse.aether.graph.DependencyVisitor
A dependency visitor that records all paths leading to nodes matching a certain filter criteria.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PathRecordingDependencyVisitor(org.eclipse.aether.graph.DependencyFilter filter)
    Creates a new visitor that uses the specified filter to identify terminal nodes of interesting paths.
    PathRecordingDependencyVisitor(org.eclipse.aether.graph.DependencyFilter filter, boolean excludeChildrenOfMatches)
    Creates a new visitor that uses the specified filter to identify terminal nodes of interesting paths.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.aether.graph.DependencyFilter
    Gets the filter being used to select terminal nodes.
    List<List<org.eclipse.aether.graph.DependencyNode>>
    Gets the paths leading to nodes matching the filter that have been recorded during the graph visit.
    boolean
    visitEnter(org.eclipse.aether.graph.DependencyNode node)
     
    boolean
    visitLeave(org.eclipse.aether.graph.DependencyNode node)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PathRecordingDependencyVisitor

      public PathRecordingDependencyVisitor(org.eclipse.aether.graph.DependencyFilter filter)
      Creates a new visitor that uses the specified filter to identify terminal nodes of interesting paths. The visitor will not search for paths going beyond an already matched node.
      Parameters:
      filter - The filter used to select terminal nodes of paths to record, may be null to match any node.
    • PathRecordingDependencyVisitor

      public PathRecordingDependencyVisitor(org.eclipse.aether.graph.DependencyFilter filter, boolean excludeChildrenOfMatches)
      Creates a new visitor that uses the specified filter to identify terminal nodes of interesting paths.
      Parameters:
      filter - The filter used to select terminal nodes of paths to record, may be null to match any node.
      excludeChildrenOfMatches - Flag controlling whether children of matched nodes should be excluded from the traversal, thereby ignoring any potential paths to other matching nodes beneath a matching ancestor node. If true, all recorded paths will have only one matching node (namely the terminal node), if false a recorded path can consist of multiple matching nodes.
  • Method Details

    • getFilter

      public org.eclipse.aether.graph.DependencyFilter getFilter()
      Gets the filter being used to select terminal nodes.
      Returns:
      The filter being used or null if none.
    • getPaths

      public List<List<org.eclipse.aether.graph.DependencyNode>> getPaths()
      Gets the paths leading to nodes matching the filter that have been recorded during the graph visit. A path is given as a sequence of nodes, starting with the root node of the graph and ending with a node that matched the filter.
      Returns:
      The recorded paths, never null.
    • visitEnter

      public boolean visitEnter(org.eclipse.aether.graph.DependencyNode node)
      Specified by:
      visitEnter in interface org.eclipse.aether.graph.DependencyVisitor
    • visitLeave

      public boolean visitLeave(org.eclipse.aether.graph.DependencyNode node)
      Specified by:
      visitLeave in interface org.eclipse.aether.graph.DependencyVisitor