@Test public void testExprs() { Map<String, IpAccessList> namedAcls = ImmutableMap.of(); assertThat(referencedSources(namedAcls, TRUE), empty()); assertThat(referencedSources(namedAcls, FALSE), empty()); assertThat( referencedSources(namedAcls, ORIGINATING_FROM_DEVICE), contains(SOURCE_ORIGINATING_FROM_DEVICE)); assertThat(referencedSources(namedAcls, matchDst(Ip.AUTO)), empty()); assertThat( referencedSources(namedAcls, matchSrcInterface("a", "b", "c")), containsInAnyOrder("a", "b", "c")); assertThat( referencedSources(namedAcls, and(matchSrcInterface("a"), matchSrcInterface("b", "c"))), containsInAnyOrder("a", "b", "c")); assertThat( referencedSources(namedAcls, not(matchSrcInterface("a", "b", "c"))), containsInAnyOrder("a", "b", "c")); assertThat( referencedSources(namedAcls, or(matchSrcInterface("a"), matchSrcInterface("b", "c"))), containsInAnyOrder("a", "b", "c")); }
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; }