Class ReporterAdapter
java.lang.Object
aQute.libg.reporter.ReporterAdapter
- Direct Known Subclasses:
Env, LogToReporterAdapter, ReplacerAdapter, Slf4jReporter
-
Nested Class Summary
Nested classes/interfaces inherited from interface Report
Report.LocationNested classes/interfaces inherited from interface Reporter
Reporter.SetLocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddErrors(String prefix, Collection<String> errors) Add a number of errorsvoidaddWarnings(String prefix, Collection<String> warnings) Add a number of warningsbooleanCreate an error.Dedicated message for an exception.Return the errors.booleanbooleangetLocation(String msg) Return the errors for the given error or warning.<T> TgetMessages(Class<T> c) Return a messages object bound to this adaptergetOut()Return the warnings.booleanbooleanisOk()Check if this report has any relevant errors that should make the run associated with this report invalid.booleanThe provider of the reporter wants pedantic reporting, meaning every possible warning should be reported.booleanbooleanisTrace()voidDeprecated.Use SLF4J Logger.info(aQute.libg.slf4j.GradleLogging.LIFECYCLE) instead.voidreport(Appendable out) Report the errors and warningsvoidrun()Handy routine that can be extended by subclasses so they can run inside the contextvoidsetExceptions(boolean exceptions) voidsetPedantic(boolean pedantic) voidsetTrace(boolean b) voidCreate a warning.Create a warning.
-
Constructor Details
-
ReporterAdapter
public ReporterAdapter() -
ReporterAdapter
-
-
Method Details
-
isExceptions
public boolean isExceptions()- Returns:
- the exceptions
-
setExceptions
public void setExceptions(boolean exceptions) - Parameters:
exceptions- the exceptions to set
-
getOut
- Returns:
- the out
-
isTrace
public boolean isTrace()- Returns:
- the trace
-
setPedantic
public void setPedantic(boolean pedantic) - Parameters:
pedantic- the pedantic to set
-
error
Description copied from interface:ReporterCreate an error. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method. -
exception
-
warning
Description copied from interface:ReporterCreate a warning. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method. -
progress
Deprecated.Use SLF4J Logger.info(aQute.libg.slf4j.GradleLogging.LIFECYCLE) instead.Description copied from interface:ReporterCreate a warning. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method. -
trace
Description copied from interface:ReporterCreate a warning. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method. -
getWarnings
Description copied from interface:ReportReturn the warnings. This list must not be changed and may be immutable.- Specified by:
getWarningsin interfaceReport- Returns:
- the warnings
-
getErrors
-
isPedantic
public boolean isPedantic()Description copied from interface:ReporterThe provider of the reporter wants pedantic reporting, meaning every possible warning should be reported.- Specified by:
isPedanticin interfaceReporter- Returns:
- if this is a pedantic reporter.
-
setTrace
public void setTrace(boolean b) -
isOk
public boolean isOk()Description copied from interface:ReportCheck if this report has any relevant errors that should make the run associated with this report invalid. I.e. if this returns false then the run should be disregarded. -
isPerfect
public boolean isPerfect() -
check
-
report
Report the errors and warnings -
getInfo
-
getInfo
-
getLocation
Description copied from interface:ReportReturn the errors for the given error or warning. Can return null.- Specified by:
getLocationin interfaceReport- Parameters:
msg- The message- Returns:
- null or the location of the message
-
run
-
getMessages
Return a messages object bound to this adapter -
addErrors
Add a number of errors -
addWarnings
Add a number of warnings
-