Package Torello.JavaDoc.Messager
Class Messager
- java.lang.Object
-
- Torello.JavaDoc.Messager.Messager
-
public class Messager extends java.lang.Object
Hi-Lited Source-Code:- View Here: Torello/JavaDoc/Messager/Messager.java
- Open New Browser-Tab: Torello/JavaDoc/Messager/Messager.java
File Size: 12,637 Bytes Line Count: 386 '\n' Characters Found
-
-
Method Summary
Initialize a Thread-Local Messager Instance Modifier and Type Method static void
initializeThreadLocalInstance(int verbosityLevel, Appendable logAppendable)
Print Text to Terminal Modifier and Type Method static void
print(String s)
static void
println()
static void
println(String s)
Print Text for Lower Verbosity Settings Modifier and Type Method static void
printQuiet(String s)
static void
printSilent(boolean dotOrNewLine)
Set Current Program Location Modifier and Type Method static void
setCurrentFileName(String fName, String fNameKind)
static void
setDeclaration(Declaration declaration)
static void
setTopDescriptionSection()
Report User Error Modifier and Type Method static void
userErrorContinue(String message, String signature, Where_Am_I WHERE_AM_I)
static void
userErrorContinue(String message, Where_Am_I WHERE_AM_I)
static void
userErrorContinue(Throwable t, String message, Where_Am_I WHERE_AM_I)
static void
userErrorContinueST(Throwable t, String message, Where_Am_I WHERE_AM_I)
Report User Error and Exit Modifier and Type Method static Error
userErrorHalt(String message, Where_Am_I WHERE_AM_I)
static Error
userErrorHalt(Throwable t, String message, Where_Am_I WHERE_AM_I)
Report Warning Modifier and Type Method static void
warning(String message, Where_Am_I WHERE_AM_I)
Report Assertion Failure and Exit Modifier and Type Method static Error
assertFail(String message, String signature, Where_Am_I WHERE_AM_I)
static Error
assertFail(String message, Where_Am_I WHERE_AM_I)
static Error
assertFail(Throwable t, String message, String signature, Where_Am_I WHERE_AM_I)
static Error
assertFail(Throwable t, String message, Where_Am_I WHERE_AM_I)
Report Assertion Failure (Non-Fatal) Modifier and Type Method static void
assertFailContinue(String message, Where_Am_I WHERE_AM_I)
static void
assertFailContinue(Throwable t, String message, Where_Am_I WHERE_AM_I)
Error State Query Modifier and Type Method static boolean
hadErrors()
Conditional Output Checkpoint Modifier and Type Method static void
ifLogCheckPointLog()
static void
ifVerboseAppendVerbose()
-
-
-
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);
-
setTopDescriptionSection
public static void setTopDescriptionSection()
- Code:
- Exact Method Body:
final Messager m = tlInstance.get(); m.printRecord.setTopDescriptionSection();
-
setDeclaration
public static void setDeclaration(Declaration declaration)
- Code:
- Exact Method Body:
final Messager m = tlInstance.get(); m.printRecord.setDeclaration(declaration);
-
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();
-
-