@Test public void testVisitCommunityMatchRegex() { CommunityMatchRegex cmr = new CommunityMatchRegex(ColonSeparatedRendering.instance(), "^20:"); Set<CommunityVar> result = _varCollector.visitCommunityMatchRegex(cmr, _baseConfig); CommunityVar cvar = CommunityVar.from("^20:"); assertEquals(ImmutableSet.of(cvar), result); }
@Override public Set<CommunityVar> visitCommunityMatchRegex( CommunityMatchRegex communityMatchRegex, Configuration arg) { return ImmutableSet.of(CommunityVar.from(communityMatchRegex.getRegex())); }
CommunityMatchExprVarCollector implements CommunityMatchExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitCommunityMatchRegex( CommunityMatchRegex communityMatchRegex, Configuration arg) { return ImmutableSet.of(CommunityVar.from(communityMatchRegex.getRegex())); } }
CommunityMatchExprVarCollector implements CommunityMatchExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitCommunityMatchRegex( CommunityMatchRegex communityMatchRegex, Configuration arg) { return ImmutableSet.of(CommunityVar.from(communityMatchRegex.getRegex())); }  }
CommunityMatchExprVarCollector implements CommunityMatchExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitCommunityMatchRegex( CommunityMatchRegex communityMatchRegex, Configuration arg) { return ImmutableSet.of(CommunityVar.from(communityMatchRegex.getRegex())); }  @Override Set<CommunityVar> visitAllExtendedCommunities(
      AllExtendedCommunities allExtendedCommunities, Configuration arg); @Override Set<CommunityVar> visitAllLargeCommunities(
      AllLargeCommunities allLargeCommunities, Configuration arg); @Override Set<CommunityVar> visitAllStandardCommunities(
      AllStandardCommunities allStandardCommunities, Configuration arg); @Override Set<CommunityVar> visitCommunityAcl(CommunityAcl communityAcl, Configuration arg); @Override Set<CommunityVar> visitCommunityIn(CommunityIn communityIn, Configuration arg); @Override Set<CommunityVar> visitCommunityIs(CommunityIs communityIs, Configuration arg); @Override Set<CommunityVar> visitCommunityMatchAll(
      CommunityMatchAll communityMatchAll, Configuration arg); @Override Set<CommunityVar> visitCommunityMatchAny(
      CommunityMatchAny communityMatchAny, Configuration arg); @Override Set<CommunityVar> visitCommunityMatchExprReference(
      CommunityMatchExprReference communityMatchExprReference, Configuration arg); @Override Set<CommunityVar> visitCommunityMatchRegex(
      CommunityMatchRegex communityMatchRegex, Configuration arg); @Override Set<CommunityVar> visitCommunityNot(CommunityNot communityNot, Configuration arg); @Override Set<CommunityVar> visitExtendedCommunityGlobalAdministratorHighMatch(
      ExtendedCommunityGlobalAdministratorHighMatch extendedCommunityGlobalAdministratorHighMatch,
      Configuration arg); @Override Set<CommunityVar> visitExtendedCommunityGlobalAdministratorLowMatch(
      ExtendedCommunityGlobalAdministratorLowMatch extendedCommunityGlobalAdministratorLowMatch,
      Configuration arg); @Override Set<CommunityVar> visitExtendedCommunityGlobalAdministratorMatch(
      ExtendedCommunityGlobalAdministratorMatch extendedCommunityGlobalAdministratorMatch,
      Configuration arg); @Override Set<CommunityVar> visitExtendedCommunityLocalAdministratorMatch(
      ExtendedCommunityLocalAdministratorMatch extendedCommunityLocalAdministratorMatch,
      Configuration arg); @Override Set<CommunityVar> visitRouteTargetExtendedCommunities(
      RouteTargetExtendedCommunities routeTargetExtendedCommunities, Configuration arg); @Override Set<CommunityVar> visitSiteOfOriginExtendedCommunities(
      SiteOfOriginExtendedCommunities siteOfOriginExtendedCommunities, Configuration arg); @Override Set<CommunityVar> visitStandardCommunityHighMatch(
      StandardCommunityHighMatch standardCommunityHighMatch, Configuration arg); @Override Set<CommunityVar> visitStandardCommunityLowMatch(
      StandardCommunityLowMatch standardCommunityLowMatch, Configuration arg); @Override Set<CommunityVar> visitVpnDistinguisherExtendedCommunities(
      VpnDistinguisherExtendedCommunities vpnDistinguisherExtendedCommunities, Configuration arg); }
CommunityMatchExprVarCollector implements CommunityMatchExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitCommunityMatchRegex( CommunityMatchRegex communityMatchRegex, Configuration arg) { return ImmutableSet.of(CommunityVar.from(communityMatchRegex.getRegex())); }  @Override Set<CommunityVar> visitAllExtendedCommunities(
      AllExtendedCommunities allExtendedCommunities, Configuration arg); @Override Set<CommunityVar> visitAllLargeCommunities(
      AllLargeCommunities allLargeCommunities, Configuration arg); @Override Set<CommunityVar> visitAllStandardCommunities(
      AllStandardCommunities allStandardCommunities, Configuration arg); @Override Set<CommunityVar> visitCommunityAcl(CommunityAcl communityAcl, Configuration arg); @Override Set<CommunityVar> visitCommunityIn(CommunityIn communityIn, Configuration arg); @Override Set<CommunityVar> visitCommunityIs(CommunityIs communityIs, Configuration arg); @Override Set<CommunityVar> visitCommunityMatchAll(
      CommunityMatchAll communityMatchAll, Configuration arg); @Override Set<CommunityVar> visitCommunityMatchAny(
      CommunityMatchAny communityMatchAny, Configuration arg); @Override Set<CommunityVar> visitCommunityMatchExprReference(
      CommunityMatchExprReference communityMatchExprReference, Configuration arg); @Override Set<CommunityVar> visitCommunityMatchRegex(
      CommunityMatchRegex communityMatchRegex, Configuration arg); @Override Set<CommunityVar> visitCommunityNot(CommunityNot communityNot, Configuration arg); @Override Set<CommunityVar> visitExtendedCommunityGlobalAdministratorHighMatch(
      ExtendedCommunityGlobalAdministratorHighMatch extendedCommunityGlobalAdministratorHighMatch,
      Configuration arg); @Override Set<CommunityVar> visitExtendedCommunityGlobalAdministratorLowMatch(
      ExtendedCommunityGlobalAdministratorLowMatch extendedCommunityGlobalAdministratorLowMatch,
      Configuration arg); @Override Set<CommunityVar> visitExtendedCommunityGlobalAdministratorMatch(
      ExtendedCommunityGlobalAdministratorMatch extendedCommunityGlobalAdministratorMatch,
      Configuration arg); @Override Set<CommunityVar> visitExtendedCommunityLocalAdministratorMatch(
      ExtendedCommunityLocalAdministratorMatch extendedCommunityLocalAdministratorMatch,
      Configuration arg); @Override Set<CommunityVar> visitRouteTargetExtendedCommunities(
      RouteTargetExtendedCommunities routeTargetExtendedCommunities, Configuration arg); @Override Set<CommunityVar> visitSiteOfOriginExtendedCommunities(
      SiteOfOriginExtendedCommunities siteOfOriginExtendedCommunities, Configuration arg); @Override Set<CommunityVar> visitStandardCommunityHighMatch(
      StandardCommunityHighMatch standardCommunityHighMatch, Configuration arg); @Override Set<CommunityVar> visitStandardCommunityLowMatch(
      StandardCommunityLowMatch standardCommunityLowMatch, Configuration arg); @Override Set<CommunityVar> visitVpnDistinguisherExtendedCommunities(
      VpnDistinguisherExtendedCommunities vpnDistinguisherExtendedCommunities, Configuration arg);  }