Class ToHtml.DeliveryContext<T>

java.lang.Object
eu.bandm.tools.lablog.base.ToHtml.DeliveryContext<T>
Direct Known Subclasses:
ToHtml.DeliverBlockContent, ToHtml.DeliverDivContent, ToHtml.DeliverInline, ToHtml.DeliverToListItem, ToHtml.DeliverToPre, ToHtml.DeliverToTd
Enclosing class:
ToHtml

protected abstract class ToHtml.DeliveryContext<T> extends Object
A delivery context maintains a list into which the generated html elements can be stored. Possibly they will be wrapped into other container classes. This architecture comes from the fact that divverent elements can be contained in very different cntexts, and may need this wrapping.
  • Field Details

    • pred

      Predecessor, must be != null but for the very first / most outer context.
    • list

      List<T> list
      List of all collected generated HTML elements.
  • Constructor Details

    • DeliveryContext

      protected DeliveryContext(@Opt @Opt ToHtml.DeliveryContext<?> pred)
      Only constructor.
      Parameters:
      pred - predecessor, must be != null but for the very first / most outer context.
  • Method Details

    • deliver

      void deliver(Element_block_content e)
      Accept an Html block element. This method defaults to reject it with an IllegalStateException and can be overridden by the subclass.
    • deliver

      void deliver(Element_a e)
      Accept an Html anchor element. This method defaults to reject it with an IllegalStateException and can be overridden by the subclass.
    • deliver

      void deliver(Element_inline e)
      Accept an Html inline element. This method defaults to reject it with an IllegalStateException and can be overridden by the subclass.
    • deliver

      void deliver(TypedPCData e)
      Accept Html typed pc data. This method defaults to reject it with an IllegalStateException and can be overridden by the subclass.