|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.javascript.jscomp.BasicErrorManager
public abstract class BasicErrorManager
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 Summary | |
---|---|
BasicErrorManager()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicErrorManager()
Method Detail |
---|
public void report(CheckLevel level, JSError error)
ErrorManager
ErrorManager.generateReport()
at the discretion of the implementation.
report
in interface ErrorHandler
report
in interface ErrorManager
level
- the reporting levelerror
- the error to reportpublic void generateReport()
ErrorManager
ErrorManager.report(com.google.javascript.jscomp.CheckLevel, com.google.javascript.jscomp.JSError)
calls.
generateReport
in interface ErrorManager
public abstract void println(CheckLevel level, JSError error)
generateReport()
method when generating messages.
protected abstract void printSummary()
public int getErrorCount()
ErrorManager
getErrorCount
in interface ErrorManager
public int getWarningCount()
ErrorManager
getWarningCount
in interface ErrorManager
public JSError[] getErrors()
ErrorManager
getErrors
in interface ErrorManager
public JSError[] getWarnings()
ErrorManager
getWarnings
in interface ErrorManager
public void setTypedPercent(double typedPercent)
ErrorManager
setTypedPercent
in interface ErrorManager
public double getTypedPercent()
ErrorManager
getTypedPercent
in interface ErrorManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |