|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAnalysisReport
This will handle the report produced by an analyser. Initially it will probably be directed straight to a print stream and so this can be a simple container for something like a StringBuffer. In the longer term we probably want to preserve the formatting information in order to turn this into some alternative rich output such as HTML or XML etc.
Field Summary | |
---|---|
static java.lang.String |
FORMAT_COLUMNS
Type for startFormatSection(String, String) : print all fields
on the same line, with column alignment as specified by the args
parameter. |
static java.lang.String |
FORMAT_VERBATIM
Type for startFormatSection(String) : print all fields verbatim,
i.e. just the value, with no name, no prefix, and concatenated
with all other fields in the section. |
static java.lang.String |
TAG_ERROR
Tag for a field that represents an error encountered while generating some data for the report |
static java.lang.String |
TAG_HIDETITLE
Tag for a section or report that should be printed without a title |
static java.lang.String |
TAG_MAJORHEADING
Tag for a section or report that should be considered a major section, with a big title |
static java.lang.String |
TAG_OBSERVATION
Tag for a field that represents a potential problem detected by the tool |
static java.lang.String |
TAG_STANDOUT
Tag for a section or report that should be printed so that it "stands-out" from other surrounding sections, e.g. surrounded by white space |
Method Summary | |
---|---|
IAnalysisReport |
close()
End the output document. |
void |
endSection()
Mark the end of the previously started subsection. |
void |
endSection(int depth)
Mark the end of all previously started subsections up to the specified depth. |
void |
printField(java.lang.String name,
long value)
Print a named integer report field. |
void |
printField(java.lang.String name,
java.lang.String value)
Print a named report field. |
void |
printField(java.lang.String name,
java.lang.String value,
java.lang.String tag,
java.lang.String details)
Print a named report field, specifying special options |
void |
printFieldHex(java.lang.String name,
long value)
Print a named integer report field as a hexadecimal value. |
void |
printIdent(java.lang.Object refKey)
Print a named reference to some object or another report embedded in this report. |
void |
printIdent(java.lang.String title,
java.lang.Object refKey)
Print a named reference to some object or another report embedded in this report. |
void |
printLiteral(java.lang.String value)
Print a literal string in a report. |
void |
printReport(IAnalysisReport value)
Embed an entire report from another analyzer inside this report, without a title. |
void |
printReport(java.lang.String title,
IAnalysisReport value)
Embed an entire report from another analyzer inside this report. |
void |
printReport(java.lang.String title,
IAnalysisReport value,
java.lang.String tag)
Embed an entire report from another analyzer inside this report. |
int |
startFormatSection(java.lang.String type)
Start a formatting section. |
int |
startFormatSection(java.lang.String type,
java.lang.String args)
Start a formatting section. |
int |
startIdentitySection()
Start a identity section. |
int |
startSection()
Start a subsection of the report. |
int |
startSection(java.lang.String name)
Start a named subsection of the report. |
int |
startSection(java.lang.String name,
java.lang.String tag)
Start a named subsection of the report. |
Field Detail |
---|
static final java.lang.String FORMAT_VERBATIM
startFormatSection(String)
: print all fields verbatim,
i.e. just the value, with no name, no prefix, and concatenated
with all other fields in the section.
static final java.lang.String FORMAT_COLUMNS
startFormatSection(String, String)
: print all fields
on the same line, with column alignment as specified by the args
parameter.
Columns alignment is given as a space separated sequence of integers indicating the relative
proportions of the available space given for each columns. E.g. "3 2 1" gives the first column
as three times the size of the last and the second as two thirds the size of the first.
static final java.lang.String TAG_ERROR
static final java.lang.String TAG_OBSERVATION
static final java.lang.String TAG_HIDETITLE
static final java.lang.String TAG_MAJORHEADING
static final java.lang.String TAG_STANDOUT
Method Detail |
---|
void printField(java.lang.String name, java.lang.String value)
name
- name of the report field.value
- field's value.void printField(java.lang.String name, java.lang.String value, java.lang.String tag, java.lang.String details)
name
- name of the report fieldvalue
- field's valuetag
- any tag associated with this field, to control output or usage (e.g. error, debug, etc.)details
- additional details to be output with this fieldvoid printField(java.lang.String name, long value)
name
- name of the report field.value
- field's value.void printFieldHex(java.lang.String name, long value)
name
- name of the field.value
- field's value.void printLiteral(java.lang.String value)
value
- the literal string to print.void printIdent(java.lang.String title, java.lang.Object refKey)
title
- title to be used for the reference.refKey
- a reference to the target sub-report or objectvoid printIdent(java.lang.Object refKey)
refKey
- a reference to the target sub-report or objectvoid printReport(java.lang.String title, IAnalysisReport value, java.lang.String tag)
title
- title to be used for the embedded report.value
- report to be embedded in the current reporttag
- any tag associated with this field, to control output or usagevoid printReport(java.lang.String title, IAnalysisReport value)
title
- title to be used for the embedded report.value
- report to be embedded in the current reportvoid printReport(IAnalysisReport value)
value
- report to be embedded in the current reportint startSection(java.lang.String name)
name
- name of the subsection.
int startSection()
int startSection(java.lang.String name, java.lang.String tag)
name
- name of the subsection.tag
- any tag associated with this field, to control output or usage
int startFormatSection(java.lang.String type, java.lang.String args)
type
- type of the format to use on elements of this section.args
- arguments to use for this type of formatting.
int startFormatSection(java.lang.String type)
type
- type of the format to use on elements of this section.
int startIdentitySection()
void endSection()
void endSection(int depth)
depth
- the depth of nested sections to closeIAnalysisReport close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |