|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectaQute.libg.reporter.ReporterAdapter
public class ReporterAdapter
Mainly used for testing where reporters are needed.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter |
|---|
Reporter.SetLocation |
| Nested classes/interfaces inherited from interface aQute.service.reporter.Report |
|---|
Report.Location |
| Constructor Summary | |
|---|---|
ReporterAdapter()
|
|
ReporterAdapter(Appendable app)
|
|
| Method Summary | ||
|---|---|---|
void |
addErrors(String prefix,
Collection<String> errors)
Add a number of errors |
|
void |
addWarnings(String prefix,
Collection<String> warnings)
Add a number of warnings |
|
boolean |
check(String... pattern)
|
|
Reporter.SetLocation |
error(String s,
Object... args)
Create an error. |
|
Reporter.SetLocation |
exception(Throwable t,
String s,
Object... args)
Dedicated message for an exception. |
|
List<String> |
getErrors()
Return the errors. |
|
boolean |
getInfo(Report other)
|
|
boolean |
getInfo(Report other,
String prefix)
|
|
Report.Location |
getLocation(String msg)
Return the errors for the given error or warning. |
|
|
getMessages(Class<T> c)
Return a messages object bound to this adapter |
|
Formatter |
getOut()
|
|
List<String> |
getWarnings()
Return the warnings. |
|
boolean |
isExceptions()
|
|
boolean |
isOk()
Check if this report has any relevant errors that should make the run associated with this report invalid. |
|
boolean |
isPedantic()
The provider of the reporter wants pedantic reporting, meaning every possible warning should be reported. |
|
boolean |
isPerfect()
|
|
boolean |
isTrace()
|
|
void |
progress(float progress,
String s,
Object... args)
Create a warning. |
|
void |
report(Appendable out)
Report the errors and warnings |
|
void |
run()
Handy routine that can be extended by subclasses so they can run inside the context |
|
void |
setExceptions(boolean exceptions)
|
|
void |
setPedantic(boolean pedantic)
|
|
void |
setTrace(boolean b)
|
|
void |
trace(String s,
Object... args)
Create a warning. |
|
Reporter.SetLocation |
warning(String s,
Object... args)
Create a warning. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReporterAdapter()
public ReporterAdapter(Appendable app)
| Method Detail |
|---|
public boolean isExceptions()
public void setExceptions(boolean exceptions)
exceptions - the exceptions to setpublic Formatter getOut()
public boolean isTrace()
public void setPedantic(boolean pedantic)
pedantic - the pedantic to set
public Reporter.SetLocation error(String s,
Object... args)
Reporter
error in interface Reporters - The format of the errorargs - The arguments of the error
public Reporter.SetLocation exception(Throwable t,
String s,
Object... args)
Reporter
exception in interface Reportert - The exceptionargs - The arguments
public Reporter.SetLocation warning(String s,
Object... args)
Reporter
warning in interface Reporters - The format of the errorargs - The arguments of the error
public void progress(float progress,
String s,
Object... args)
Reporter
progress in interface Reporterprogress - A value between 0 and 1 indicating the progress. 0 is starting
and >=1 is done.s - The format of the errorargs - The arguments of the error
public void trace(String s,
Object... args)
Reporter
trace in interface Reporters - The format of the errorargs - The arguments of the errorpublic List<String> getWarnings()
Report
getWarnings in interface Reportpublic List<String> getErrors()
Report
getErrors in interface Reportpublic boolean isPedantic()
Reporter
isPedantic in interface Reporterpublic void setTrace(boolean b)
public boolean isOk()
Report
isOk in interface Reportpublic boolean isPerfect()
public boolean check(String... pattern)
public void report(Appendable out)
public boolean getInfo(Report other)
public boolean getInfo(Report other,
String prefix)
public Report.Location getLocation(String msg)
Report
getLocation in interface Reportmsg - The message
public void run()
run in interface Runnablepublic <T> T getMessages(Class<T> c)
public void addErrors(String prefix,
Collection<String> errors)
public void addWarnings(String prefix,
Collection<String> warnings)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||