class RoutePolicyStatementVarCollector implements StatementVisitor<Set<CommunityVar>, Configuration> {

  @Override
  public Set<CommunityVar> visitIf(If if1, Configuration arg) {
    ImmutableSet.Builder<CommunityVar> builder = ImmutableSet.builder();
    return builder
        .addAll(if1.getGuard().accept(new BooleanExprVarCollector(), arg))
        .addAll(visitAll(if1.getTrueStatements(), arg))
        .addAll(visitAll(if1.getFalseStatements(), arg))
        .build();
  }

}