Class NonFormatPrinter

java.lang.Object
eu.bandm.tools.format.Visitor
eu.bandm.tools.format.NonFormatPrinter

public class NonFormatPrinter extends Visitor
Prints a format discarding all formatting. Variables are printed as such and not resolved against any context. Is used by Format.toString() and thus ubiquituously used in debugging. (Deeper graphs will hardly be human-readable.)
  • Constructor Summary

    Constructors
    Constructor
    Description
    Sole constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Visit all sub formats of the compound format and print them, separated by one space character.
    void
    Print nothing.
    void
    Print the contents of the literal format.
    void
    Print the contents of the markup format.
    void
    Visit the sub-formats of the prior format, dependent on dynamic situation w.r.t.
    void
    Print every space format as one single space character.
    void
    Visit the sub formats of the compound format.
    void
    Visit all sub formats of the compound format and print them, separated by one space character.
    void
    Print the un-resolved variable as a symbolic representation of prefix and name, followed by a space.
    default void
    Switch controlled by type, which calls a particular method action(f) with the most-specific class of the format.
    default void
    Central switch controlled by type, which calls a particular method action(f) with the most-specific class of the format.
    default void
    Switch conrolled by type, which calls a particular method action(f) with the most-specific class of the format.
    default void
    Switch controlled by type, which calls a particular method action(f) with the most-specific class of the format.
    protected void
    Auxiliary method: visit all sub formats of a compound format and print them, separated by one space character.

    Methods inherited from class eu.bandm.tools.format.Visitor

    action, action, action, action, action, action, action, action, action, action, action

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NonFormatPrinter

      public NonFormatPrinter(PrintWriter p)
      Sole constructor.
      Parameters:
      p - the target of the printing.
  • Method Details

    • printWithSpace

      protected void printWithSpace(Compound f)
      Auxiliary method: visit all sub formats of a compound format and print them, separated by one space character.
      Parameters:
      f - the compound to visit.
    • action

      public void action(Beneath f)
      Visit all sub formats of the compound format and print them, separated by one space character.
      Overrides:
      action in class Visitor
      Parameters:
      f - the compound to visit.
    • action

      public void action(Tabular f)
      Visit all sub formats of the compound format and print them, separated by one space character.
      Overrides:
      action in class Visitor
      Parameters:
      f - the compound to visit.
    • action

      public void action(Empty f)
      Print nothing.
      Overrides:
      action in class Visitor
      Parameters:
      f - the format to print
    • action

      public void action(Literal f)
      Print the contents of the literal format.
      Overrides:
      action in class Visitor
      Parameters:
      f - the format to print.
    • action

      public void action(Markup f)
      Print the contents of the markup format.
      Overrides:
      action in class Visitor
      Parameters:
      f - the format to print.
    • action

      public void action(Prior f)
      Visit the sub-formats of the prior format, dependent on dynamic situation w.r.t. other prior formats.
      Overrides:
      action in class Visitor
      Parameters:
      f - the compound to visit.
      See Also:
    • action

      public void action(Space f)
      Print every space format as one single space character.
      Overrides:
      action in class Visitor
      Parameters:
      f - the format to visit.
    • action

      public void action(Subst f)
      Visit the sub formats of the compound format. The subst format itself is a scope for the evaluation process and transparent to printing.
      Overrides:
      action in class Visitor
      Parameters:
      f - the format to visit.
    • action

      public void action(Variable f)
      Print the un-resolved variable as a symbolic representation of prefix and name, followed by a space.
      Overrides:
      action in class Visitor
      Parameters:
      f - the format to visit.
    • match

      default void match(Object o)
      Switch controlled by type, which calls a particular method action(f) with the most-specific class of the format.
      Parameters:
      o - the object to visit.
    • match

      default void match(Format f)
      Central switch controlled by type, which calls a particular method action(f) with the most-specific class of the format.
      Parameters:
      f - the format to visit.
    • match

      default void match(Compound f)
      Switch controlled by type, which calls a particular method action(f) with the most-specific class of the format.
      Parameters:
      f - the format to visit.
    • match

      default void match(Variable f)
      Switch conrolled by type, which calls a particular method action(f) with the most-specific class of the format.
      Parameters:
      f - the format to visit.