Interface SourceFragmentPrinter

All Known Implementing Classes:
DefaultSourceFragmentPrinter, SourceFragmentContextList, SourceFragmentContextNormal

public interface SourceFragmentPrinter
An object that knows how to print PrinterEvent
  • Method Details

    • onPush

      void onPush()
      called when pushed on the stack
    • print

      void print(PrinterEvent event)
      Called when DefaultJavaPrettyPrinter starts an operation
      event - the DefaultJavaPrettyPrinter event
    • update

      int update(PrinterEvent event)
      Update the internal state of this printer for this event but does not print anything. Returns the index of the fragment corresponding to this event.
    • onFinished

      void onFinished()
      Called when printing using this context is going to finish
    • knowsHowToPrint

      boolean knowsHowToPrint(PrinterEvent event)
      true if this printer is able to handle this event That is that we can safely call print(PrinterEvent) after having called this one.