Class Messager
java.lang.Object
com.sun.tools.javac.util.AbstractLog
com.sun.tools.javac.util.Log
gw.gosudoc.com.sun.tools.javadoc.main.Messager
- All Implemented Interfaces:
DocErrorReporter
Deprecated.
Utility for integrating with javadoc tools and for localization.
Handle Resources. Access to error and warning counts.
Message formatting.
Also provides implementation for DocErrorReporter.
Also provides implementation for DocErrorReporter.
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.sun.tools.javac.util.Log
com.sun.tools.javac.util.Log.DeferredDiagnosticHandler, com.sun.tools.javac.util.Log.DiagnosticHandler, com.sun.tools.javac.util.Log.DiscardDiagnosticHandler, com.sun.tools.javac.util.Log.PrefixKind, com.sun.tools.javac.util.Log.WriterKind -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final PrintWriterDeprecated.The default writer for diagnostics(package private) static final PrintWriterDeprecated.(package private) static final PrintWriterDeprecated.private final com.sun.tools.javac.util.JCDiagnostic.FactoryDeprecated.private LocaleDeprecated.private final com.sun.tools.javac.util.JavacMessagesDeprecated.static final SourcePositionDeprecated.(package private) final StringDeprecated.Fields inherited from class com.sun.tools.javac.util.Log
compressedOutput, diagListener, dumpOnError, emitWarnings, errKey, expectDiagKeys, logKey, MaxErrors, MaxWarnings, nerrors, nsuppressederrors, nsuppressedwarns, nwarnings, outKey, promptOnError, recorded, recordedSourceLevelErrors, suppressNotesFields inherited from class com.sun.tools.javac.util.AbstractLog
diags, source, sourceMap -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.ConstructorprotectedMessager(com.sun.tools.javac.util.Context context, String programName, PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter) Deprecated.Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoiderror(SourcePosition pos, String key, Object... args) Deprecated.Print error message, increment error count.voidexit()Deprecated.Force program exit, e.g., from a fatal error.voidDeprecated.Print exit message.(package private) StringDeprecated.get and format message string from resourcestatic Messagerinstance0(com.sun.tools.javac.util.Context context) Deprecated.Get the current messager, which is also the compiler log.intnerrors()Deprecated.Return total number of errors, including those recorded in the compilation log.voidDeprecated.Print a message.intDeprecated.Return total number of warnings, including those recorded in the compilation log.static voidpreRegister(com.sun.tools.javac.util.Context context, String programName) Deprecated.static voidpreRegister(com.sun.tools.javac.util.Context context, String programName, PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter) Deprecated.voidprintError(SourcePosition pos, String msg) Deprecated.Print error message, increment error count.voidprintError(String msg) Deprecated.Print error message, increment error count.voidprintNotice(SourcePosition pos, String msg) Deprecated.Print a message.voidprintNotice(String msg) Deprecated.Print a message.voidprintWarning(SourcePosition pos, String msg) Deprecated.Print warning message, increment warning count.voidprintWarning(String msg) Deprecated.Print warning message, increment warning count.private voidreport(com.sun.tools.javac.util.JCDiagnostic.DiagnosticType type, SourcePosition pos, String msg) Deprecated.voidDeprecated.voidwarning(SourcePosition pos, String key, Object... args) Deprecated.Print warning message, increment warning count.Methods inherited from class com.sun.tools.javac.util.Log
currentSourceFile, directError, flush, flush, format, getDefaultMaxErrors, getDefaultMaxWarnings, getDiagnosticFormatter, getLocalizedString, getWriter, getWriterForDiagnosticType, hasDiagnosticListener, hasErrorOn, instance, localize, localize, localize, popDiagnosticHandler, preRegister, printLines, printLines, printLines, printLines, printLines, printNewline, printNewline, printRawLines, printRawLines, printRawLines, printVerbose, prompt, rawError, rawWarning, report, setDiagnosticFormatter, setEndPosTable, setWriter, setWriters, shouldReport, strictWarning, writeDiagnosticMethods inherited from class com.sun.tools.javac.util.AbstractLog
currentSource, error, error, error, error, error, error, error, getSource, mandatoryNote, mandatoryWarning, mandatoryWarning, note, note, note, note, useSource, warning, warning, warning, warning, warning
-
Field Details
-
NOPOS
Deprecated. -
programName
Deprecated. -
locale
Deprecated. -
messages
private final com.sun.tools.javac.util.JavacMessages messagesDeprecated. -
javadocDiags
private final com.sun.tools.javac.util.JCDiagnostic.Factory javadocDiagsDeprecated. -
defaultErrWriter
Deprecated.The default writer for diagnostics -
defaultWarnWriter
Deprecated. -
defaultNoticeWriter
Deprecated.
-
-
Constructor Details
-
Messager
Deprecated.Constructor- Parameters:
programName- Name of the program (for error messages).
-
Messager
protected Messager(com.sun.tools.javac.util.Context context, String programName, PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter) Deprecated.Constructor- Parameters:
programName- Name of the program (for error messages).errWriter- Stream for error messageswarnWriter- Stream for warningsnoticeWriter- Stream for other messages
-
-
Method Details
-
instance0
Deprecated.Get the current messager, which is also the compiler log. -
preRegister
Deprecated. -
preRegister
public static void preRegister(com.sun.tools.javac.util.Context context, String programName, PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter) Deprecated. -
setLocale
Deprecated. -
getText
Deprecated.get and format message string from resource- Parameters:
key- selects message from resourceargs- arguments for the message
-
printError
Deprecated.Print error message, increment error count. Part of DocErrorReporter.- Specified by:
printErrorin interfaceDocErrorReporter- Parameters:
msg- message to print
-
printError
Deprecated.Print error message, increment error count. Part of DocErrorReporter.- Specified by:
printErrorin interfaceDocErrorReporter- Parameters:
pos- the position where the error occursmsg- message to print
-
printWarning
Deprecated.Print warning message, increment warning count. Part of DocErrorReporter.- Specified by:
printWarningin interfaceDocErrorReporter- Parameters:
msg- message to print
-
printWarning
Deprecated.Print warning message, increment warning count. Part of DocErrorReporter.- Specified by:
printWarningin interfaceDocErrorReporter- Parameters:
pos- the position where the error occursmsg- message to print
-
printNotice
Deprecated.Print a message. Part of DocErrorReporter.- Specified by:
printNoticein interfaceDocErrorReporter- Parameters:
msg- message to print
-
printNotice
Deprecated.Print a message. Part of DocErrorReporter.- Specified by:
printNoticein interfaceDocErrorReporter- Parameters:
pos- the position where the error occursmsg- message to print
-
error
Deprecated.Print error message, increment error count.- Parameters:
key- selects message from resource
-
warning
Deprecated.Print warning message, increment warning count.- Parameters:
key- selects message from resource
-
notice
Deprecated.Print a message.- Parameters:
key- selects message from resource
-
nerrors
public int nerrors()Deprecated.Return total number of errors, including those recorded in the compilation log. -
nwarnings
public int nwarnings()Deprecated.Return total number of warnings, including those recorded in the compilation log. -
exitNotice
public void exitNotice()Deprecated.Print exit message. -
exit
public void exit()Deprecated.Force program exit, e.g., from a fatal error.TODO: This method does not really belong here.
-
report
private void report(com.sun.tools.javac.util.JCDiagnostic.DiagnosticType type, SourcePosition pos, String msg) Deprecated.
-