@Test public void testReferencedInterfaces() { Set<String> interfaces = ImmutableSet.of("iface1", "iface2"); MatchSrcInterface matchSrcInterface = new MatchSrcInterface(interfaces); ExprAclLine.Builder lineBuilder = ExprAclLine.builder().setAction(LineAction.PERMIT); ExprAclLine line = lineBuilder.setMatchCondition(matchSrcInterface).build(); assertThat(FilterLineReachabilityUtils.getReferencedInterfaces(line), equalTo(interfaces)); line = lineBuilder .setMatchCondition(new AndMatchExpr(ImmutableList.of(matchSrcInterface))) .build(); assertThat(FilterLineReachabilityUtils.getReferencedInterfaces(line), equalTo(interfaces)); line = lineBuilder.setMatchCondition(new OrMatchExpr(ImmutableList.of(matchSrcInterface))).build(); assertThat(FilterLineReachabilityUtils.getReferencedInterfaces(line), equalTo(interfaces)); line = lineBuilder.setMatchCondition(new NotMatchExpr(matchSrcInterface)).build(); assertThat(FilterLineReachabilityUtils.getReferencedInterfaces(line), equalTo(interfaces)); }
public static Set<String> getReferencedInterfaces(AclLine line) { return INTERFACES_COLLECTOR.visit(line).collect(ImmutableSet.toImmutableSet()); }
FilterLineReachabilityUtils { public static Set<String> getReferencedInterfaces(AclLine line) { return INTERFACES_COLLECTOR.visit(line).collect(ImmutableSet.toImmutableSet()); } }
FilterLineReachabilityUtils { public static Set<String> getReferencedInterfaces(AclLine line) { return INTERFACES_COLLECTOR.visit(line).collect(ImmutableSet.toImmutableSet()); } private  FilterLineReachabilityUtils(); }
FilterLineReachabilityUtils { public static Set<String> getReferencedInterfaces(AclLine line) { return INTERFACES_COLLECTOR.visit(line).collect(ImmutableSet.toImmutableSet()); } private  FilterLineReachabilityUtils(); static Set<String> getReferencedAcls(AclLine line); static Set<String> getReferencedInterfaces(AclLine line); }
FilterLineReachabilityUtils { public static Set<String> getReferencedInterfaces(AclLine line) { return INTERFACES_COLLECTOR.visit(line).collect(ImmutableSet.toImmutableSet()); } private  FilterLineReachabilityUtils(); static Set<String> getReferencedAcls(AclLine line); static Set<String> getReferencedInterfaces(AclLine line);  }