Package org.openrewrite.maven.graph
Interface DependencyTreeWalker.Callback
- Enclosing class:
DependencyTreeWalker
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback interface for handling dependencies during tree traversal.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ResolvedDependency dependency, Deque<ResolvedDependency> path) Called when a dependency is visited or matches a pattern.
-
Method Details
-
accept
Called when a dependency is visited or matches a pattern.The path is in leaf-to-root order:
path.getFirst()returns the current dependency,path.getLast()returns the direct (root) dependency.- Parameters:
dependency- the current dependency being visited/matchedpath- the path from this dependency to direct dependency (leaf-to-root order); usegetLast()for the direct dependency, iterate normally for leaf-to-root
-