Class GraphUtils
java.lang.Object
org.pgcodekeeper.core.model.graph.GraphUtils
Utility class for working with dependency graphs.
Provides methods for traversing dependency graphs in forward and reverse directions
using depth-first search algorithms.
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<IStatement>forward(DepcyGraph depcyGraph, IStatement statement) Gets all statements that the given statement depends on (forward dependencies).static List<IStatement>reverse(DepcyGraph depcyGraph, IStatement statement) Gets all statements that depend on the given statement (reverse dependencies).
-
Method Details
-
reverse
Gets all statements that depend on the given statement (reverse dependencies). Performs depth-first search traversal to find ALL dependent objects at any depth level, without limitations on traversal depth. This ensures complete dependency resolution for complex multi-level dependency chains.- Parameters:
depcyGraph- the dependency graph to traversestatement- the statement to find dependents for- Returns:
- list of all statements that directly or indirectly depend on the given statement
-
forward
Gets all statements that the given statement depends on (forward dependencies). Performs depth-first search traversal to find ALL dependency objects at any depth level, without limitations on traversal depth. This ensures complete dependency resolution for complex multi-level dependency chains.- Parameters:
depcyGraph- the dependency graph to traversestatement- the statement to find dependencies for- Returns:
- list of all statements that the given statement directly or indirectly depends on
-