Class PrintRecord


  • public class PrintRecord
    extends java.lang.Object
    This is an internally used class that serves as a "Data-Record" type which maintains all of the internally needed "state" that is required to run the Messager Package.

    PrintRecord is a long-lived, singleton-like object created at startup by the Messager system to store reusable message infrastructure and runtime state. It is not re-instantiated for each message, but instead carries fixed dependencies and reusable components throughout the entire lifetime of the tool.

    Its fields fall into two categories:

    • Immutable Fields (declared final)
      These include output targets like the Appendable used for logging, the current verbosity level, newline formatting hints, a shared StorageWriter, and a reusable StringBuilder. These fields are initialized once and never reset.

    • Mutable Fields
      These represent the current location within the application logic. They track things like the active file being processed, the Where_Am_I value, or other module-level context. These are reset via specific "bulk update" methods when the program moves from one logical section to another.

    PrintRecord acts as the state-holder for the current printing context. It does not itself emit messages, but stores the values that are consulted by the classes PrintMessage and PrintHeading during message generation.

    To preserve encapsulation, all mutable fields are private. Read-only access is granted through package-visible getters, and updates can only be performed through carefully designed setter methods that update relevant fields in groups.

    This class is not part of the public API. It exists solely to provide the underlying context and dependencies required by the higher-level messaging logic, and is shown here only for developers interested in source-level transparency.

    Click the “Hi-Lited Source” button above to view the structure of the class.


    Written by Chat-GPT, on July 1st, 2025


    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait