diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java index 79ff3a9e15..e7992f43a9 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java +++ b/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java @@ -200,11 +200,29 @@ public class BlazeQueryEnvironment extends AbstractBlazeQueryEnvironment<Target> } @Override + public Collection<Target> getFwdDeps(Iterable<Target> targets) { + Set<Target> result = new HashSet<>(); + for (Target target : targets) { + result.addAll(getFwdDeps(target)); + } + return result; + } + + @Override public Collection<Target> getReverseDeps(Target target) { return getTargetsFromNodes(getNode(target).getPredecessors()); } @Override + public Collection<Target> getReverseDeps(Iterable<Target> targets) { + Set<Target> result = new HashSet<>(); + for (Target target : targets) { + result.addAll(getReverseDeps(target)); + } + return result; + } + + @Override public Set<Target> getTransitiveClosure(Set<Target> targetNodes) { for (Target node : targetNodes) { checkBuilt(node); |