@Test public void test() { SubstitutionWithoutCssSpanStrategy strategy = new SubstitutionWithoutCssSpanStrategy(SpanType.BOLD); EventDocumentBuilder builder = new EventDocumentBuilder(); strategy.beginSpan(builder, SpanType.ITALIC, new Attributes("1", "class", "style", "lang")); List<DocumentBuilderEvent> events = builder.getDocumentBuilderEvents().getEvents(); assertEquals(ImmutableList.of(new BeginSpanEvent(SpanType.BOLD, new Attributes("1", "class", null, "lang"))), events); }
@Override public void beginSpan(DocumentBuilder builder, SpanType unsupportedType, Attributes attributes) { Attributes attributesCopy = attributes.clone(); attributesCopy.setCssStyle(null); super.beginSpan(builder, unsupportedType, attributesCopy); }
SubstitutionWithoutCssSpanStrategy extends SubstitutionSpanStrategy { @Override public void beginSpan(DocumentBuilder builder, SpanType unsupportedType, Attributes attributes) { Attributes attributesCopy = attributes.clone(); attributesCopy.setCssStyle(null); super.beginSpan(builder, unsupportedType, attributesCopy); } }
SubstitutionWithoutCssSpanStrategy extends SubstitutionSpanStrategy { @Override public void beginSpan(DocumentBuilder builder, SpanType unsupportedType, Attributes attributes) { Attributes attributesCopy = attributes.clone(); attributesCopy.setCssStyle(null); super.beginSpan(builder, unsupportedType, attributesCopy); } SubstitutionWithoutCssSpanStrategy(SpanType type); }
SubstitutionWithoutCssSpanStrategy extends SubstitutionSpanStrategy { @Override public void beginSpan(DocumentBuilder builder, SpanType unsupportedType, Attributes attributes) { Attributes attributesCopy = attributes.clone(); attributesCopy.setCssStyle(null); super.beginSpan(builder, unsupportedType, attributesCopy); } SubstitutionWithoutCssSpanStrategy(SpanType type); @Override void beginSpan(DocumentBuilder builder, SpanType unsupportedType, Attributes attributes); }
SubstitutionWithoutCssSpanStrategy extends SubstitutionSpanStrategy { @Override public void beginSpan(DocumentBuilder builder, SpanType unsupportedType, Attributes attributes) { Attributes attributesCopy = attributes.clone(); attributesCopy.setCssStyle(null); super.beginSpan(builder, unsupportedType, attributesCopy); } SubstitutionWithoutCssSpanStrategy(SpanType type); @Override void beginSpan(DocumentBuilder builder, SpanType unsupportedType, Attributes attributes);  }