@Override public Set<String> collectSources( Set<String> parentSources, Map<String, RoutingPolicy> routingPolicies, Warnings w) { return _statement.collectSources(parentSources, routingPolicies, w); }
public Set<String> computeSources( Set<String> parentSources, Map<String, RoutingPolicy> routingPolicies, Warnings w) { if (_sources == null) { Set<String> newParentSources = Sets.union(parentSources, ImmutableSet.of(_name)); ImmutableSet.Builder<String> childSources = ImmutableSet.builder(); childSources.add(_name); for (Statement statement : _statements) { childSources.addAll(statement.collectSources(newParentSources, routingPolicies, w)); } _sources = childSources.build(); } return _sources; }
@Override public Set<String> collectSources( Set<String> parentSources, Map<String, RoutingPolicy> routingPolicies, Warnings w) { ImmutableSet.Builder<String> childSources = ImmutableSet.builder(); for (Statement statement : _falseStatements) { childSources.addAll(statement.collectSources(parentSources, routingPolicies, w)); } for (Statement statement : _trueStatements) { childSources.addAll(statement.collectSources(parentSources, routingPolicies, w)); } if (_guard != null) { childSources.addAll(_guard.collectSources(parentSources, routingPolicies, w)); } return childSources.build(); }
@Override public Set<String> collectSources( Set<String> sources, Map<String, RoutingPolicy> routingPolicies, Warnings w) { ImmutableSet.Builder<String> childSources = ImmutableSet.builder(); if (_expr != null) { childSources.addAll(_expr.collectSources(sources, routingPolicies, w)); } for (Statement statement : _postStatements) { childSources.addAll(statement.collectSources(sources, routingPolicies, w)); } for (Statement statement : _postTrueStatements) { childSources.addAll(statement.collectSources(sources, routingPolicies, w)); } for (Statement statement : _preStatements) { childSources.addAll(statement.collectSources(sources, routingPolicies, w)); } return childSources.build(); }