public class PrintStreamErrorManager extends BasicErrorManager
An error manager that prints errors and warnings to the print stream
provided in addition to the functionality of the
BasicErrorManager
.
It collaborates with a SourceExcerptProvider
via a
MessageFormatter
to display error messages with source context.
Constructor and Description |
---|
PrintStreamErrorManager(MessageFormatter formatter,
java.io.PrintStream stream)
Creates an error manager.
|
PrintStreamErrorManager(java.io.PrintStream stream)
Creates an instance with a source-less error formatter.
|
Modifier and Type | Method and Description |
---|---|
void |
println(CheckLevel level,
JSError error)
Print a message with a trailing new line.
|
void |
printSummary()
Print the summary of the compilation - number of errors and warnings.
|
void |
setSummaryDetailLevel(int summaryDetailLevel) |
generateReport, getErrorCount, getErrors, getTypedPercent, getWarningCount, getWarnings, hasHaltingErrors, report, setTypedPercent
public PrintStreamErrorManager(MessageFormatter formatter, java.io.PrintStream stream)
formatter
- the message formatter used to format the messagesstream
- the stream on which the errors and warnings should be
printed. This class does not close the streampublic PrintStreamErrorManager(java.io.PrintStream stream)
public void println(CheckLevel level, JSError error)
BasicErrorManager
BasicErrorManager.generateReport()
method when generating messages.println
in class BasicErrorManager
public void setSummaryDetailLevel(int summaryDetailLevel)
public void printSummary()
BasicErrorManager
printSummary
in class BasicErrorManager
Copyright © 2009-2018 Google. All Rights Reserved.