@Test public void testReferencedAcls() { String aclName = "acl"; PermittedByAcl permittedByAcl = new PermittedByAcl(aclName); ExprAclLine.Builder lineBuilder = ExprAclLine.builder().setAction(LineAction.PERMIT); ExprAclLine line = lineBuilder.setMatchCondition(permittedByAcl).build(); assertThat(FilterLineReachabilityUtils.getReferencedAcls(line), contains(aclName)); line = lineBuilder.setMatchCondition(new AndMatchExpr(ImmutableList.of(permittedByAcl))).build(); assertThat(FilterLineReachabilityUtils.getReferencedAcls(line), contains(aclName)); line = lineBuilder.setMatchCondition(new OrMatchExpr(ImmutableList.of(permittedByAcl))).build(); assertThat(FilterLineReachabilityUtils.getReferencedAcls(line), contains(aclName)); line = lineBuilder.setMatchCondition(new NotMatchExpr(permittedByAcl)).build(); assertThat(FilterLineReachabilityUtils.getReferencedAcls(line), contains(aclName)); }
public static Set<String> getReferencedAcls(AclLine line) { return ACLS_COLLECTOR.visit(line).collect(ImmutableSet.toImmutableSet()); }
FilterLineReachabilityUtils { public static Set<String> getReferencedAcls(AclLine line) { return ACLS_COLLECTOR.visit(line).collect(ImmutableSet.toImmutableSet()); } }
FilterLineReachabilityUtils { public static Set<String> getReferencedAcls(AclLine line) { return ACLS_COLLECTOR.visit(line).collect(ImmutableSet.toImmutableSet()); } private  FilterLineReachabilityUtils(); }
FilterLineReachabilityUtils { public static Set<String> getReferencedAcls(AclLine line) { return ACLS_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> getReferencedAcls(AclLine line) { return ACLS_COLLECTOR.visit(line).collect(ImmutableSet.toImmutableSet()); } private  FilterLineReachabilityUtils(); static Set<String> getReferencedAcls(AclLine line); static Set<String> getReferencedInterfaces(AclLine line);  }