|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.util.logging.AbstractReporter
org.eclipse.actf.util.logging.PrintWriterReporter
public class PrintWriterReporter
implementation to generate report records to the specified PrintWriter
object.
Field Summary | |
---|---|
protected StringBuffer |
formatBuffer
|
protected StringBuffer |
lastReportBuffer
|
protected int[] |
levelCount
|
protected boolean |
open
|
protected boolean |
reportStarted
|
protected PrintWriter |
writer
|
Fields inherited from class org.eclipse.actf.util.logging.AbstractReporter |
---|
bundle, categories, CATEGORY_FORMATTER, categoryFormatter, defaultOutputLevel, errorLoggers, SOURCE_ID_MAP, sourceID |
Fields inherited from interface org.eclipse.actf.util.logging.IReporter |
---|
CONFIG, CONFIGURATION, DEFAULT_LEVEL, DETAIL, ERROR, INFO, KEYS, MAX_LEVEL, MIN_LEVEL, SEVERE, SYSTEM_FATAL, SYSTEM_NONFATAL, TRACE, UNKNOWN, USER, VALIDATION, WARNING |
Constructor Summary | |
---|---|
PrintWriterReporter(PrintWriter writer)
create a new reporter using the given PrintWriter |
|
PrintWriterReporter(PrintWriter writer,
ResourceBundle bundle)
create a new reporter using the given PrintWriter |
Method Summary | |
---|---|
void |
addReportRecords(List records)
|
void |
close()
close processing |
void |
endReport()
ends a report started with startReport . |
void |
flush()
Flush any pending output |
int |
getErrorCount()
return the number of errors reported thus far by this reporter. |
String |
getLastReport()
get the last reported message |
int |
getLevelCount(int level)
return the number of messages at the given level reported thus far by this reporter. |
String |
getMethodNameFromStack()
Get the class and method name that called PrintUtils.println(). |
String |
getMethodNameFromStack(int numLinesToIgnore)
Returns the class and method name from a line in the stack. |
PrintWriter |
getPrintWriter()
get the PrintWriter being used by this Reporter |
String |
getThreadInfo()
Get info about the calling Thread. |
int |
getWarningCount()
return the number of warnings reported thus far by this reporter. |
boolean |
isOpen()
returns whether or not this reporter is open |
boolean |
isReportStarted()
|
void |
open()
Open for processing |
void |
report(int level,
String message,
Object[] values)
report the message at the given level with the given substitution values |
void |
reset()
reset the reporter. This method should clear all categories and all remaining buffers and report records. |
void |
resetCount()
reset the counts to 0. |
void |
setLastReport(String reportText)
set the last report on this reporter. |
void |
startReport(Object comp)
start a new report. |
String |
toString()
|
Methods inherited from class org.eclipse.actf.util.logging.AbstractReporter |
---|
endCategory, endCategory, getCategory, getCategoryFormatter, getDefaultOutputLevel, getReporter, getResourceBundle, getSourceID, getSourceIDString, registerErrorLogger, report, report, report, report, report, report, setCategoryFormatter, setDefaultOutputLevel, setResourceBundle, setSourceID, startCategory, unregisterErrorLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected PrintWriter writer
protected int[] levelCount
protected boolean open
protected StringBuffer formatBuffer
protected StringBuffer lastReportBuffer
protected boolean reportStarted
Constructor Detail |
---|
public PrintWriterReporter(PrintWriter writer)
writer
- -- underlying PrintWriterpublic PrintWriterReporter(PrintWriter writer, ResourceBundle bundle)
writer
- -- underlying PrintWriterformat
- -- message formatterbundle
- Method Detail |
---|
public void reset()
reset
in interface IReporter
reset
in class AbstractReporter
public PrintWriter getPrintWriter()
public int getErrorCount()
public int getWarningCount()
public int getLevelCount(int level)
level
- - level of messages to be counted
public void resetCount()
public String getLastReport()
public String toString()
toString
in class Object
public void open()
public boolean isOpen()
true
if has been opened, false
otherwiseIReporter.open()
public void close()
public void report(int level, String message, Object[] values)
IReporter.report(int, String)
public void flush()
public boolean isReportStarted()
public void startReport(Object comp)
endReport
call.
comp
- - root component for which report is being generatedpublic void endReport()
startReport
. Once this method is called, the getLastReport
method can be called in order to supply the report generated betwen the startReport
call and
this call.
public void setLastReport(String reportText)
ValidationLauncher.DISTINCT_JVM
after the launcher gets an indication that a report has completed.
reportText
- - last report generatedpublic String getThreadInfo()
public String getMethodNameFromStack()
public String getMethodNameFromStack(int numLinesToIgnore)
numLinesToIgnore
- number of lines in the stack trace to ignore
public void addReportRecords(List records)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |