@Test public void testApplyTo_any() { JunosApplication junosApp = JunosApplication.ANY; FwFromJunosApplication from = new FwFromJunosApplication(junosApp); List<ExprAclLine> lines = new ArrayList<>(); HeaderSpace.Builder hsBuilder = HeaderSpace.builder(); from.applyTo(null, hsBuilder, LineAction.PERMIT, lines, null); assertThat( lines, equalTo( ImmutableList.of( new ExprAclLine( LineAction.PERMIT, new MatchHeaderSpace(HeaderSpace.builder().build()), null, junosApp.getBaseApplication().getTermTraceElement(null))))); }
@Override public void applyTo( JuniperConfiguration jc, HeaderSpace.Builder srcHeaderSpaceBuilder, LineAction action, List<? super ExprAclLine> lines, Warnings w) { if (!_junosApplication.hasDefinition()) { w.redFlag("Reference to undefined application: \"" + _junosApplication.name() + "\""); } else { _junosApplication.applyTo(jc, srcHeaderSpaceBuilder, action, lines, w); } }
FwFromJunosApplication implements FwFromApplicationSetMember { @Override public void applyTo( JuniperConfiguration jc, HeaderSpace.Builder srcHeaderSpaceBuilder, LineAction action, List<? super ExprAclLine> lines, Warnings w) { if (!_junosApplication.hasDefinition()) { w.redFlag("Reference to undefined application: \"" + _junosApplication.name() + "\""); } else { _junosApplication.applyTo(jc, srcHeaderSpaceBuilder, action, lines, w); } } }
FwFromJunosApplication implements FwFromApplicationSetMember { @Override public void applyTo( JuniperConfiguration jc, HeaderSpace.Builder srcHeaderSpaceBuilder, LineAction action, List<? super ExprAclLine> lines, Warnings w) { if (!_junosApplication.hasDefinition()) { w.redFlag("Reference to undefined application: \"" + _junosApplication.name() + "\""); } else { _junosApplication.applyTo(jc, srcHeaderSpaceBuilder, action, lines, w); } } FwFromJunosApplication(JunosApplication junosApplication); }
FwFromJunosApplication implements FwFromApplicationSetMember { @Override public void applyTo( JuniperConfiguration jc, HeaderSpace.Builder srcHeaderSpaceBuilder, LineAction action, List<? super ExprAclLine> lines, Warnings w) { if (!_junosApplication.hasDefinition()) { w.redFlag("Reference to undefined application: \"" + _junosApplication.name() + "\""); } else { _junosApplication.applyTo(jc, srcHeaderSpaceBuilder, action, lines, w); } } FwFromJunosApplication(JunosApplication junosApplication); @Override void applyTo(
      JuniperConfiguration jc,
      HeaderSpace.Builder srcHeaderSpaceBuilder,
      LineAction action,
      List<? super ExprAclLine> lines,
      Warnings w); @Override AclLineMatchExpr toAclLineMatchExpr(JuniperConfiguration jc, Warnings w); }
FwFromJunosApplication implements FwFromApplicationSetMember { @Override public void applyTo( JuniperConfiguration jc, HeaderSpace.Builder srcHeaderSpaceBuilder, LineAction action, List<? super ExprAclLine> lines, Warnings w) { if (!_junosApplication.hasDefinition()) { w.redFlag("Reference to undefined application: \"" + _junosApplication.name() + "\""); } else { _junosApplication.applyTo(jc, srcHeaderSpaceBuilder, action, lines, w); } } FwFromJunosApplication(JunosApplication junosApplication); @Override void applyTo(
      JuniperConfiguration jc,
      HeaderSpace.Builder srcHeaderSpaceBuilder,
      LineAction action,
      List<? super ExprAclLine> lines,
      Warnings w); @Override AclLineMatchExpr toAclLineMatchExpr(JuniperConfiguration jc, Warnings w);  }