public class SortingErrorManager extends java.lang.Object implements ErrorManager
SortingErrorManager.ErrorReportGenerator
interface.Modifier and Type | Class and Description |
---|---|
static interface |
SortingErrorManager.ErrorReportGenerator
Strategy for customizing the output format of the error report
|
Constructor and Description |
---|
SortingErrorManager(java.util.Set<SortingErrorManager.ErrorReportGenerator> errorReportGenerators) |
Modifier and Type | Method and Description |
---|---|
void |
generateReport()
Writes a report to an implementation-specific medium.
|
int |
getErrorCount()
Gets the number of reported errors.
|
com.google.common.collect.ImmutableList<JSError> |
getErrors()
Gets all the errors.
|
double |
getTypedPercent()
Gets the percentage of typed expressions.
|
int |
getWarningCount()
Gets the number of reported warnings.
|
com.google.common.collect.ImmutableList<JSError> |
getWarnings()
Gets all the warnings.
|
boolean |
hasHaltingErrors()
Returns if the error manager has errors that should make compilation halt.
|
void |
report(CheckLevel level,
JSError error)
Reports an error.
|
void |
setTypedPercent(double typedPercent)
Sets the percentage of typed expressions.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
shouldReportConformanceViolation
public SortingErrorManager(java.util.Set<SortingErrorManager.ErrorReportGenerator> errorReportGenerators)
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 boolean hasHaltingErrors()
ErrorManager
hasHaltingErrors
in interface ErrorManager
public int getErrorCount()
ErrorManager
getErrorCount
in interface ErrorManager
public int getWarningCount()
ErrorManager
getWarningCount
in interface ErrorManager
public com.google.common.collect.ImmutableList<JSError> getErrors()
ErrorManager
getErrors
in interface ErrorManager
public com.google.common.collect.ImmutableList<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
public void generateReport()
ErrorManager
ErrorManager.report(com.google.javascript.jscomp.CheckLevel, com.google.javascript.jscomp.JSError)
calls.generateReport
in interface ErrorManager
Copyright © 2009-2020 Google. All Rights Reserved.