Package Torello.JavaDoc.Messager
Class PrintHeading
- java.lang.Object
-
- Torello.JavaDoc.Messager.PrintHeading
-
public class PrintHeading extends java.lang.Object
This is an internally used class that handles the Text-Generation for the Error-Message Headers.PrintHeading
prints the heading text that appears at the very top of every Error-Message or Assertion-Failure generated by the Messager package. Put simply, this class generates the heading label shown at the start of error output.
These headings are used to signal visual cues to users — not just strings, but format-sensitive tags that control indentation, color, line spacing, and terminal styling.
The contents of an Error-Message or Assert-Fail heading typically include the name of the current file being analyzed and, optionally, theEntity
(Method, Field, Constructor, etc...) under inspection. After this, a custom-definedWhere_Am_I
enum constant may be appended to the heading to clarify what the tool or processor was doing at the time of failure.
These constants are not meant for the user of the tool itself, but for the *end users* of that tool — the people who will be reading the error message. In other words, if you are building a command-line application using the Messager system, aWhere_Am_I
constant helps your users understand the purpose of the analysis that failed (e.g., "Checking Attributes", "Parsing Metadata", "Generating Output").
The JDU Messager-Tool allows for two types of errors for printing, which are hopefully explained clearly, here:- Assertion Failure: Failure caused by
insufficient developer code.
- User Error: The End-User has misapplied a Program-Construct, Configuration-File or Invocation and should correct his mistakes.
In the world of software engineering, the latter resembles compiler-style user errors (like those emitted byjavac
). The former reflects internal assertion failures — signs of edge cases not yet fully debugged. Writing bug-free tools takes time; assertion checks help track down subtle design issues.
PrintHeading
objects are solely created internally, and are not meant for direct use outside the package, nor are they a part of the End-User API. This class documentation page is here solely for the purpose of allowing a programmer to see the contents of this Package-Private Class.
Users can view the internal structure by clicking the “Hi-Lited Source” button on this documentation page.
Initially Written by Chat-GPT, on July 1st, 2025
Hi-Lited Source-Code:- View Here: Torello/JavaDoc/Messager/PrintHeading.java
- Open New Browser-Tab: Torello/JavaDoc/Messager/PrintHeading.java
File Size: 7,256 Bytes Line Count: 187 '\n' Characters Found
- Assertion Failure: Failure caused by
insufficient developer code.