Class XmlMessageReporterBase<M>

java.lang.Object
com.github.oowekyala.ooxml.messages.XmlMessageReporterBase<M>
All Implemented Interfaces:
XmlMessageReporter<M>, AutoCloseable

public abstract class XmlMessageReporterBase<M> extends Object implements XmlMessageReporter<M>
Base implementation of XmlMessageReporter.
  • Field Details

  • Constructor Details

  • Method Details

    • create2ndStage

      protected abstract M create2ndStage(XmlPosition position, XmlPositioner positioner)
      Creates the object returned by at(Node). Override this instead of at(Node) because maybe in the future other at(Node) overloads will be provided.
      Parameters:
      position - Position of the message
      positioner - Positioner
    • handleEx

      protected void handleEx(XmlException e)
      Handle an XML exception. The default just calls the printer.
    • at

      public M at(Node node)
      Description copied from interface: XmlMessageReporter
      Returns the second stage, which typically allows reporting messages like reporter.at(node).error("an error");.
      Specified by:
      at in interface XmlMessageReporter<M>
    • close

      public void close()
      Do nothing by default.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface XmlMessageReporter<M>