Class Messager

    • Method Detail

      • initializeThreadLocalInstance

        🡇     🗕  🗗  🗖
        public static void initializeThreadLocalInstance​
                    (int verbosityLevel,
                     java.lang.Appendable logAppendable)
        
        Code:
        Exact Method Body:
         if (tlInstance.get() != null) throw new InternalError(
             "The Messager's `java.lang.ThreadLocal' instance has already been initialized for " +
             "this thread."
         );
        
         if ((verbosityLevel < 0) || (verbosityLevel > 3)) throw new InternalError(
             "verbosityLevel=" + verbosityLevel + ", " +
             "but it must be between 0 and 3."
         );
        
         final PrintRecord   printRecord     = new PrintRecord(verbosityLevel, logAppendable);
         final PrintHeading  printHeading    = new PrintHeading(printRecord);
         final PrintMessage  printMessage    = new PrintMessage(printRecord, printHeading);
         final Messager      messager        = new Messager(printRecord, printMessage);
        
         tlInstance.set(messager);
        
      • print

        🡅  🡇     🗕  🗗  🗖
        public static void print​(java.lang.String s)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
         if (m.printRecord.verbosityLevel >= 2) m.printRecord.screenWriterSW.print(s);
        
      • println

        🡅  🡇     🗕  🗗  🗖
        public static void println​(java.lang.String s)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
         if (m.printRecord.verbosityLevel >= 2) m.printRecord.screenWriterSW.println(s);
        
      • println

        🡅  🡇     🗕  🗗  🗖
        public static void println()
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
         if (m.printRecord.verbosityLevel >= 2) m.printRecord.screenWriterSW.println();
        
      • printQuiet

        🡅  🡇     🗕  🗗  🗖
        public static void printQuiet​(java.lang.String s)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
         if (m.printRecord.verbosityLevel == 1) m.printRecord.screenWriterSW.print(s);
        
      • printSilent

        🡅  🡇     🗕  🗗  🗖
        public static void printSilent​(boolean dotOrNewLine)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         if (m.printRecord.verbosityLevel == 0)
             m.printRecord.screenWriterSW.print(dotOrNewLine ? '.' : '\n');
        
      • ifVerboseAppendVerbose

        🡅  🡇     🗕  🗗  🗖
        public static void ifVerboseAppendVerbose()
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         if (m.printRecord.verbosityLevel == 3)
             m.printRecord.screenWriterSW.print(MsgVerbose.getAndClear());
        
      • warning

        🡅  🡇     🗕  🗗  🗖
        public static void warning​(java.lang.String message,
                                   Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.WARNING(message, WHERE_AM_I);
         m.printRecord.writeSBToScreen();
        
      • assertFail

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Error assertFail​(java.lang.String message,
                                                 Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             message,
             null,   // signature
             true,   // FATAL
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
         throw new AssertFail();
        
      • assertFail

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Error assertFail​(java.lang.String message,
                                                 java.lang.String signature,
                                                 Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             message,
             signature,
             true, // FATAL
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
         throw new AssertFail();
        
      • assertFail

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Error assertFail​(java.lang.Throwable t,
                                                 java.lang.String message,
                                                 Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             message,
             null,   // signature
             true,   // FATAL
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
         throw new AssertFail();
        
      • assertFail

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Error assertFail​(java.lang.Throwable t,
                                                 java.lang.String message,
                                                 java.lang.String signature,
                                                 Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             message,
             signature,
             true,   // FATAL
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
         throw new AssertFail();
        
      • assertFailContinue

        🡅  🡇     🗕  🗗  🗖
        public static void assertFailContinue​(java.lang.String message,
                                              Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             message,
             null,   // signature
             false,  // NON-FATAL
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
        
      • assertFailContinue

        🡅  🡇     🗕  🗗  🗖
        public static void assertFailContinue​(java.lang.Throwable t,
                                              java.lang.String message,
                                              Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             t,
             message,
             null,   // signature
             false,  // NON-FATAL
             false,  // Don't Show Stack-Trace
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
        
      • userErrorHalt

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Error userErrorHalt​(java.lang.String message,
                                                    Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             message,
             null,       // signature    
             true,       // FATAL
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
         throw new MessagerGeneratedError();
        
      • userErrorHalt

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Error userErrorHalt​(java.lang.Throwable t,
                                                    java.lang.String message,
                                                    Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             t,          // Exception that was thrown
             message,    // THE MESSAGE
             null,       // signature    
             true,       // FATAL
             true,       // Show Stack-Trace
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
         throw new MessagerGeneratedError();
        
      • userErrorContinue

        🡅  🡇     🗕  🗗  🗖
        public static void userErrorContinue​(java.lang.String message,
                                             Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             message,
             null,   // signature
             false,  // NON-FATAL
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
        
      • userErrorContinue

        🡅  🡇     🗕  🗗  🗖
        public static void userErrorContinue​(java.lang.String message,
                                             java.lang.String signature,
                                             Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             message,
             signature,
             false, // NON-FATAL
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
        
      • userErrorContinue

        🡅  🡇     🗕  🗗  🗖
        public static void userErrorContinue​(java.lang.Throwable t,
                                             java.lang.String message,
                                             Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             t,
             message,
             null,   // signature
             false,  // NON-FATAL
             false,  // Don't Show Stack-Trace
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
        
      • userErrorContinueST

        🡅  🡇     🗕  🗗  🗖
        public static void userErrorContinueST​(java.lang.Throwable t,
                                               java.lang.String message,
                                               Where_Am_I WHERE_AM_I)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
        
         m.printMessage.ERROR(
             t,
             message,
             null,   // signature
             false,  // NON-FATAL
             true,   // SHOW STACK TRACE
             WHERE_AM_I
         );
        
         m.printRecord.writeSBToScreen();
        
      • setCurrentFileName

        🡅  🡇     🗕  🗗  🗖
        public static void setCurrentFileName​(java.lang.String fName,
                                              java.lang.String fNameKind)
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
         m.printRecord.setCurrentFileName(fName, fNameKind);
        
      • hadErrors

        🡅  🡇     🗕  🗗  🗖
        public static boolean hadErrors()
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
         return m.printRecord.hadErrors();
        
      • ifLogCheckPointLog

        🡅     🗕  🗗  🗖
        public static void ifLogCheckPointLog()
        Code:
        Exact Method Body:
         final Messager m = tlInstance.get();
         if (! m.printRecord.hasLogAppendable) return;
         m.printRecord.checkPointLog();