public abstract class BasicErrorManager extends Object implements ErrorManager
A basic error manager that sorts all errors and warnings reported to it to
generate a sorted report when the generateReport() method
is called.
This error manager does not produce any output, but subclasses can
override the println(CheckLevel, JSError) method to generate custom
output.
| Constructor and Description |
|---|
BasicErrorManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
generateReport()
Writes a report to an implementation-specific medium.
|
int |
getErrorCount()
Gets the number of reported errors.
|
JSError[] |
getErrors()
Gets all the errors.
|
double |
getTypedPercent()
Gets the percentage of typed expressions.
|
int |
getWarningCount()
Gets the number of reported warnings.
|
JSError[] |
getWarnings()
Gets all the warnings.
|
abstract void |
println(CheckLevel level,
JSError error)
Print a message with a trailing new line.
|
protected abstract void |
printSummary()
Print the summary of the compilation - number of errors and warnings.
|
void |
report(CheckLevel level,
JSError error)
Reports an error.
|
void |
setTypedPercent(double typedPercent)
Sets the percentage of typed expressions.
|
public void report(CheckLevel level, JSError error)
ErrorManagerErrorManager.generateReport() at the discretion of the implementation.report in interface ErrorHandlerreport in interface ErrorManagerlevel - the reporting levelerror - the error to reportpublic void generateReport()
ErrorManagerErrorManager.report(com.google.javascript.jscomp.CheckLevel, com.google.javascript.jscomp.JSError) calls.generateReport in interface ErrorManagerpublic abstract void println(CheckLevel level, JSError error)
generateReport() method when generating messages.protected abstract void printSummary()
public int getErrorCount()
ErrorManagergetErrorCount in interface ErrorManagerpublic int getWarningCount()
ErrorManagergetWarningCount in interface ErrorManagerpublic JSError[] getErrors()
ErrorManagergetErrors in interface ErrorManagerpublic JSError[] getWarnings()
ErrorManagergetWarnings in interface ErrorManagerpublic void setTypedPercent(double typedPercent)
ErrorManagersetTypedPercent in interface ErrorManagerpublic double getTypedPercent()
ErrorManagergetTypedPercent in interface ErrorManagerCopyright © 2009-2016 Google. All Rights Reserved.