@Test public void testReferencedSourcesForMultipleAcls() { IpAccessList.Builder aclBuilder = IpAccessList.builder(); IpAccessList acl1 = aclBuilder .setName("acl1") .setLines( ImmutableList.of( ExprAclLine.accepting().setMatchCondition(matchSrcInterface("a")).build())) .build(); IpAccessList acl2 = aclBuilder .setName("acl2") .setLines( ImmutableList.of( ExprAclLine.accepting().setMatchCondition(matchSrcInterface("b")).build())) .build(); IpAccessList acl3 = aclBuilder .setName("acl3") .setLines( ImmutableList.of( ExprAclLine.accepting().setMatchCondition(matchSrcInterface("c")).build())) .build(); Map<String, IpAccessList> namedAcls = ImmutableMap.of(acl1.getName(), acl1, acl2.getName(), acl2, acl3.getName(), acl3); assertThat( referencedSources(namedAcls, ImmutableSet.of(acl1.getName(), acl2.getName())), containsInAnyOrder("a", "b")); }
public static Set<String> referencedSources( Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr) { ReferenceSourcesVisitor visitor = new ReferenceSourcesVisitor(namedAcls); visitor.visit(expr); return visitor.referencedInterfaces(); }
SourcesReferencedByIpAccessLists { public static Set<String> referencedSources( Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr) { ReferenceSourcesVisitor visitor = new ReferenceSourcesVisitor(namedAcls); visitor.visit(expr); return visitor.referencedInterfaces(); } }
SourcesReferencedByIpAccessLists { public static Set<String> referencedSources( Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr) { ReferenceSourcesVisitor visitor = new ReferenceSourcesVisitor(namedAcls); visitor.visit(expr); return visitor.referencedInterfaces(); }  }
SourcesReferencedByIpAccessLists { public static Set<String> referencedSources( Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr) { ReferenceSourcesVisitor visitor = new ReferenceSourcesVisitor(namedAcls); visitor.visit(expr); return visitor.referencedInterfaces(); }  static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr); static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, IpAccessList acl); static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, Set<String> acls); }
SourcesReferencedByIpAccessLists { public static Set<String> referencedSources( Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr) { ReferenceSourcesVisitor visitor = new ReferenceSourcesVisitor(namedAcls); visitor.visit(expr); return visitor.referencedInterfaces(); }  static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr); static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, IpAccessList acl); static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, Set<String> acls); static final String SOURCE_ORIGINATING_FROM_DEVICE; }