@Test public void beginListItemRetroCompatibility() { Child child = new Child(); assertFalse(child.called); child.beginListItem(Collections.emptyMap()); assertTrue(child.called); Child2 child2 = new Child2(); assertFalse(child2.called); child2.beginListItem(Collections.emptyMap()); assertTrue(child2.called); Child3 child3 = new Child3(); assertFalse(child3.called); child3.beginListItem(Collections.emptyMap()); assertTrue(child3.called); }
@Override public void beginListItem() { ChainingListener next = getListenerChain().getNextListener(getClass()); if (next != null) { next.beginListItem(); } }
AbstractChainingListener implements ChainingListener { @Override public void beginListItem() { ChainingListener next = getListenerChain().getNextListener(getClass()); if (next != null) { next.beginListItem(); } } }
AbstractChainingListener implements ChainingListener { @Override public void beginListItem() { ChainingListener next = getListenerChain().getNextListener(getClass()); if (next != null) { next.beginListItem(); } } AbstractChainingListener(); }
AbstractChainingListener implements ChainingListener { @Override public void beginListItem() { ChainingListener next = getListenerChain().getNextListener(getClass()); if (next != null) { next.beginListItem(); } } AbstractChainingListener(); void setListenerChain(ListenerChain listenerChain); @Override ListenerChain getListenerChain(); @Override void beginDefinitionDescription(); @Override void beginDefinitionList(Map<String, String> parameters); @Override void beginDefinitionTerm(); @Override void beginDocument(MetaData metadata); @Override void beginGroup(Map<String, String> parameters); @Override void beginFormat(Format format, Map<String, String> parameters); @Override void beginHeader(HeaderLevel level, String id, Map<String, String> parameters); @Override void beginLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters); @Override void beginList(ListType type, Map<String, String> parameters); @Override void beginListItem(); @Override void beginListItem(Map<String, String> parameters); @Override void beginMacroMarker(String name, Map<String, String> parameters, String content, boolean isInline); @Override void beginParagraph(Map<String, String> parameters); @Override void beginQuotation(Map<String, String> parameters); @Override void beginQuotationLine(); @Override void beginSection(Map<String, String> parameters); @Override void beginTable(Map<String, String> parameters); @Override void beginTableCell(Map<String, String> parameters); @Override void beginTableHeadCell(Map<String, String> parameters); @Override void beginTableRow(Map<String, String> parameters); @Override void beginMetaData(MetaData metadata); @Override void beginFigure(Map<String, String> parameters); @Override void beginFigureCaption(Map<String, String> parameters); @Override void endDefinitionDescription(); @Override void endDefinitionList(Map<String, String> parameters); @Override void endDefinitionTerm(); @Override void endDocument(MetaData metadata); @Override void endGroup(Map<String, String> parameters); @Override void endFormat(Format format, Map<String, String> parameters); @Override void endHeader(HeaderLevel level, String id, Map<String, String> parameters); @Override void endLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters); @Override void endList(ListType type, Map<String, String> parameters); @Override void endListItem(); @Override void endListItem(Map<String, String> parameters); @Override void endMacroMarker(String name, Map<String, String> parameters, String content, boolean isInline); @Override void endParagraph(Map<String, String> parameters); @Override void endQuotation(Map<String, String> parameters); @Override void endQuotationLine(); @Override void endSection(Map<String, String> parameters); @Override void endTable(Map<String, String> parameters); @Override void endTableCell(Map<String, String> parameters); @Override void endTableHeadCell(Map<String, String> parameters); @Override void endTableRow(Map<String, String> parameters); @Override void endMetaData(MetaData metadata); @Override void endFigure(Map<String, String> parameters); @Override void endFigureCaption(Map<String, String> parameters); @Override void onEmptyLines(int count); @Override void onHorizontalLine(Map<String, String> parameters); @Override void onId(String name); @Override void onImage(ResourceReference reference, boolean freestanding, Map<String, String> parameters); @Override void onMacro(String id, Map<String, String> parameters, String content, boolean inline); @Override void onNewLine(); @Override void onSpace(); @Override void onSpecialSymbol(char symbol); @Override void onVerbatim(String content, boolean inline, Map<String, String> parameters); @Override void onWord(String word); @Override void onRawText(String text, Syntax syntax); }
AbstractChainingListener implements ChainingListener { @Override public void beginListItem() { ChainingListener next = getListenerChain().getNextListener(getClass()); if (next != null) { next.beginListItem(); } } AbstractChainingListener(); void setListenerChain(ListenerChain listenerChain); @Override ListenerChain getListenerChain(); @Override void beginDefinitionDescription(); @Override void beginDefinitionList(Map<String, String> parameters); @Override void beginDefinitionTerm(); @Override void beginDocument(MetaData metadata); @Override void beginGroup(Map<String, String> parameters); @Override void beginFormat(Format format, Map<String, String> parameters); @Override void beginHeader(HeaderLevel level, String id, Map<String, String> parameters); @Override void beginLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters); @Override void beginList(ListType type, Map<String, String> parameters); @Override void beginListItem(); @Override void beginListItem(Map<String, String> parameters); @Override void beginMacroMarker(String name, Map<String, String> parameters, String content, boolean isInline); @Override void beginParagraph(Map<String, String> parameters); @Override void beginQuotation(Map<String, String> parameters); @Override void beginQuotationLine(); @Override void beginSection(Map<String, String> parameters); @Override void beginTable(Map<String, String> parameters); @Override void beginTableCell(Map<String, String> parameters); @Override void beginTableHeadCell(Map<String, String> parameters); @Override void beginTableRow(Map<String, String> parameters); @Override void beginMetaData(MetaData metadata); @Override void beginFigure(Map<String, String> parameters); @Override void beginFigureCaption(Map<String, String> parameters); @Override void endDefinitionDescription(); @Override void endDefinitionList(Map<String, String> parameters); @Override void endDefinitionTerm(); @Override void endDocument(MetaData metadata); @Override void endGroup(Map<String, String> parameters); @Override void endFormat(Format format, Map<String, String> parameters); @Override void endHeader(HeaderLevel level, String id, Map<String, String> parameters); @Override void endLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters); @Override void endList(ListType type, Map<String, String> parameters); @Override void endListItem(); @Override void endListItem(Map<String, String> parameters); @Override void endMacroMarker(String name, Map<String, String> parameters, String content, boolean isInline); @Override void endParagraph(Map<String, String> parameters); @Override void endQuotation(Map<String, String> parameters); @Override void endQuotationLine(); @Override void endSection(Map<String, String> parameters); @Override void endTable(Map<String, String> parameters); @Override void endTableCell(Map<String, String> parameters); @Override void endTableHeadCell(Map<String, String> parameters); @Override void endTableRow(Map<String, String> parameters); @Override void endMetaData(MetaData metadata); @Override void endFigure(Map<String, String> parameters); @Override void endFigureCaption(Map<String, String> parameters); @Override void onEmptyLines(int count); @Override void onHorizontalLine(Map<String, String> parameters); @Override void onId(String name); @Override void onImage(ResourceReference reference, boolean freestanding, Map<String, String> parameters); @Override void onMacro(String id, Map<String, String> parameters, String content, boolean inline); @Override void onNewLine(); @Override void onSpace(); @Override void onSpecialSymbol(char symbol); @Override void onVerbatim(String content, boolean inline, Map<String, String> parameters); @Override void onWord(String word); @Override void onRawText(String text, Syntax syntax);  }