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.
| Modifier and Type | Class and Description |
|---|---|
| private class | Log.
Common diagnostic handling. |
| public class | Log.
A DiagnosticHandler that can defer some or all diagnostics, by buffering them for later examination and/or reporting. |
| public abstract class | Log.
DiagnosticHandler's provide the initial handling for diagnostics. |
| public class | Log.
A DiagnosticHandler that discards all diagnostics. |
| public static enum | |
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final EnumMap | |
| public boolean | compressedOutput
Set to true if a compressed diagnostic is reported |
| private final Context | context
The compilation context. |
| private DiagnosticFormatter | diagFormatter
Formatter for diagnostics. |
| protected DiagnosticListener | diagListener
Diagnostic listener, if provided through programmatic interface to javac (JSR 199). |
| private Log. | diagnosticHandler
Handler for initial dispatch of diagnostics. |
| public boolean | dumpOnError
Print stack trace on errors? |
| public boolean | emitWarnings
Switch: emit warning messages. |
| public static final Context. | errKey
The context key for the diagnostic PrintWriter. |
| public Set | expectDiagKeys
Keys for expected diagnostics. |
| private final LintMapper | lintMapper
The lint positions table. |
| public final EnumSet | lintWarnings
Tracks whether any warnings have been encountered in each |
| public static final Context. | logKey
The context key for the log. |
| protected int | MaxErrors
The maximum number of errors/warnings that are reported. |
| protected int | |
| private JavacMessages | messages
JavacMessages object used for localization. |
| public int | nerrors
The number of errors encountered so far. |
| public int | nonLintWarnings
The total number of non-lint warnings encountered so far. |
| public int | nsuppressederrors
The number of errors encountered after MaxErrors was reached. |
| public int | nsuppressedwarns
The number of warnings encountered after MaxWarnings was reached. |
| public int | nwarnings
The total number of warnings encountered so far. |
| private final Options | |
| public static final Context. | outKey
The context key for the standard output PrintWriter. |
| public boolean | promptOnError
Switch: prompt user on each error. |
| protected Set | recorded
A set of all errors generated so far. |
| protected Set | recordedSourceLevelErrors
A set of "not-supported-in-source-X" errors produced so far. |
| private Lint | |
| private final EnumSet | |
| public boolean | suppressNotes
Switch: suppress note messages. |
| private static boolean | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | Log(Context context, PrintWriter writer)
Construct a log with all output sent to a single output stream. |
| protected | |
| private | Log(Context
the context in which the log should be registered context, Map<Log.a map of writers that can be accessed by the kind of writer required writersCreates a log. |
| Modifier and Type | Method and Description |
|---|---|
| private WarningAggregator | |
| public void | |
| public JavaFileObject | |
| protected void | directError(String key, Object... args)
Implements abstract com.
|
| public void | |
| public void | |
| public static String | |
| private List | |
| private void | |
| protected int | |
| protected int | |
| public DiagnosticFormatter | |
| private int | |
| public static String | getLocalizedString(String
The key for the localized string. key, Object... Fields to substitute into the string. args)Find a localized string in the resource bundle. |
| public PrintWriter | |
| protected PrintWriter | |
| public boolean | |
| public boolean | hasErrorOn(JCDiagnostic.
Is an error reported at the given pos (inside the current source)? |
| private void | |
| private static Map | Returns: a map of writersthe context in which to find writers to use context)Initialize a map of writers based on values found in the context |
| private static Map | Returns: a map of writersa stream to be used for normal output out, PrintWriter a stream to be used for diagnostic messages, such as errors, warnings, etc err)Initialize a writer map for a stream for normal output, and a stream for diagnostics. |
| public static Log | |
| private Lint | |
| public String | |
| public String | |
| public String | localize(Log.
The key for the localized string. key, Object... Fields to substitute into the string. args)Find a localized string in the resource bundle. |
| public void | popDiagnosticHandler(Log.
Replace the specified diagnostic handler with the handler that was current at the time this handler was created. |
| public static void | |
| private void | printErrLine(int
Buffer index of the error position, must be on current line pos, PrintWriter writer)Print the faulty source code line and point to the error. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| private void | |
| public void | printRawLines(String msg)
Print the text of a message, translating newlines appropriately for the platform. |
| public void | printRawLines(Log.
Print the text of a message, translating newlines appropriately for the platform. |
| public static void | printRawLines(PrintWriter writer, String msg)
Print the text of a message, translating newlines appropriately for the platform. |
| public void | printVerbose(String key, Object... args)
Print the localized text of a "verbose" message to the noticeWriter stream. |
| public void | |
| public void | |
| public void | |
| public void | report(JCDiagnostic diagnostic)
Implements abstract com. Primary method to report a diagnostic. |
| public void | |
| public void | reportOutstandingWarnings()
Report unreported lint warnings for which the applicable |
| private Lint | |
| public void | setDiagnosticFormatter(DiagnosticFormatter<JCDiagnostic> diagFormatter)
Set the current diagnostic formatter. |
| public void | |
| public void | |
| protected boolean | shouldReport(JavaFileObject file, int pos)
Returns true if an error needs to be reported for a given source name and pos. |
| private boolean | |
| public void | suppressAggregatedWarningNotes(Lint.
Suppress aggregated mandatory warning notes for the specified category. |
| protected void | writeDiagnostic(JCDiagnostic diag)
Write out a diagnostic and bump the warning and error counters as needed. |