com.vladium.emma.report.html
Class ReportGenerator
java.lang.Object
com.vladium.emma.report.AbstractItemVisitor
com.vladium.emma.report.AbstractReportGenerator
com.vladium.emma.report.html.ReportGenerator
- All Implemented Interfaces:
- IAppErrorCodes, IItemVisitor, IReportGenerator
- public final class ReportGenerator
- extends AbstractReportGenerator
- implements IAppErrorCodes
- Author:
- Vlad Roubtsov, (C) 2003
Fields inherited from interface com.vladium.emma.IAppErrorCodes |
ARGS_IO_FAILURE, CLASS_STAMP_MISMATCH, INSTR_IO_FAILURE, INVALID_COLUMN_NAME, INVALID_PARAMETER_VALUE, MAIN_CLASS_BAD_DELEGATION, MAIN_CLASS_LOAD_FAILURE, MAIN_CLASS_NOT_FOUND, MAIN_METHOD_FAILURE, MAIN_METHOD_NOT_FOUND, OUT_IO_FAILURE, OUT_MKDIR_FAILURE, REPORT_GEN_FAILURE, REPORT_IO_FAILURE, REQUIRED_PARAMETER_MISSING, SECURITY_RESTRICTION, UNEXPECTED_FAILURE |
Method Summary |
private void |
addClassItemRow(IItem item,
boolean odd,
HTMLTable table,
int[] columns,
java.lang.String nameHREF,
boolean anchor)
|
private void |
addClassRow(ClassItem item,
int clsIndex,
HTMLTable table,
int[] columns,
java.lang.String itemHREF,
boolean isAnchor)
|
private int[] |
addHeaderRow(IItem item,
HTMLTable table,
int[] columns)
|
private void |
addItemRow(IItem item,
boolean odd,
HTMLTable table,
int[] columns,
java.lang.String nameHREF,
boolean anchor)
|
private static java.lang.String |
addLineAnchorID(int line,
java.lang.String anchorID,
IntObjectMap lineAnchorIDMap)
|
private IElement |
addPageFooter(HTMLDocument page,
IItem item,
IItem[] path)
|
private IElement |
addPageHeader(HTMLDocument page,
IItem item,
IItem[] path)
|
private void |
addPageHeaderTitleRow(HTMLTable header)
|
void |
cleanup()
|
private HTMLDocument |
createPage(java.lang.String title)
|
private static java.lang.String |
dataCellStyle(int column,
boolean highlight)
|
private void |
embedSrcFile(SrcFileItem item,
HTMLDocument page,
IntObjectMap anchorMap,
SourcePathCache cache)
|
private IContent |
getFooterBottom()
|
private static java.io.File |
getItemFile(java.io.File parentDir,
java.lang.String itemKey)
|
private java.lang.String |
getItemHREF(IItem base,
IItem item)
|
private static java.lang.String |
getItemKey(IItem item)
|
private IContent |
getPageTitle()
|
private IItem[] |
getParentPath(IItem item)
|
java.lang.String |
getType()
|
private static java.lang.String |
headerCellStyle(int column)
|
private static HTMLWriter |
openOutFile(java.io.File file,
java.lang.String encoding,
boolean mkdirs)
|
void |
process(IMetaData mdata,
ICoverageData cdata,
SourcePathCache cache,
IProperties properties)
|
private boolean |
srcFileAvailable(SrcFileItem item,
SourcePathCache cache)
|
private static void |
trimForDisplay(java.lang.StringBuffer buf)
|
java.lang.Object |
visit(AllItem item,
java.lang.Object ctx)
|
java.lang.Object |
visit(ClassItem item,
java.lang.Object ctx)
|
java.lang.Object |
visit(PackageItem item,
java.lang.Object ctx)
|
java.lang.Object |
visit(SrcFileItem item,
java.lang.Object ctx)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_format
private final java.text.DecimalFormat m_format
m_fieldPosition
private final java.text.FieldPosition m_fieldPosition
m_queue
private java.util.LinkedList m_queue
m_reportIDNamespace
private ReportGenerator.IDGenerator m_reportIDNamespace
m_pageTitle
private IContent m_pageTitle
m_footerBottom
private IContent m_footerBottom
USE_LINE_COVERAGE_TOOLTIPS
private static final boolean USE_LINE_COVERAGE_TOOLTIPS
- See Also:
- Constant Field Values
TYPE
private static final java.lang.String TYPE
- See Also:
- Constant Field Values
REPORT_HEADER_TITLE
private static final java.lang.String REPORT_HEADER_TITLE
- See Also:
- Constant Field Values
LEFT_BRACKET
private static final IContent LEFT_BRACKET
RIGHT_BRACKET
private static final IContent RIGHT_BRACKET
MAX_DISPLAY_NAME_LENGTH
private static final int MAX_DISPLAY_NAME_LENGTH
- See Also:
- Constant Field Values
SRC_LINE_OFFSET
private static final int SRC_LINE_OFFSET
- See Also:
- Constant Field Values
CSS_HEADER_FOOTER
private static final java.lang.String CSS_HEADER_FOOTER
- See Also:
- Constant Field Values
CSS_TITLE
private static final java.lang.String CSS_TITLE
- See Also:
- Constant Field Values
CSS_NAV
private static final java.lang.String CSS_NAV
- See Also:
- Constant Field Values
CSS_COVERAGE_ZERO
private static final java.lang.String CSS_COVERAGE_ZERO
- See Also:
- Constant Field Values
CSS_COVERAGE_PARTIAL
private static final java.lang.String CSS_COVERAGE_PARTIAL
- See Also:
- Constant Field Values
CSS_COVERAGE_COMPLETE
private static final java.lang.String CSS_COVERAGE_COMPLETE
- See Also:
- Constant Field Values
DARKER_BACKGROUND
private static final java.lang.String DARKER_BACKGROUND
- See Also:
- Constant Field Values
TITLE_BACKGROUND
private static final java.lang.String TITLE_BACKGROUND
- See Also:
- Constant Field Values
NAV_BACKGROUND
private static final java.lang.String NAV_BACKGROUND
- See Also:
- Constant Field Values
CSS_INVISIBLE_TABLE
private static final java.lang.String CSS_INVISIBLE_TABLE
- See Also:
- Constant Field Values
CSS_ITEM_NAME
private static final java.lang.String CSS_ITEM_NAME
- See Also:
- Constant Field Values
CSS_CLASS_ITEM_SPECIAL
private static final java.lang.String CSS_CLASS_ITEM_SPECIAL
- See Also:
- Constant Field Values
CSS_SOURCE
private static final java.lang.String CSS_SOURCE
- See Also:
- Constant Field Values
CSS_LINENUM
private static final java.lang.String CSS_LINENUM
- See Also:
- Constant Field Values
CSS_BOTTOM
private static final java.lang.String CSS_BOTTOM
- See Also:
- Constant Field Values
CSS_ODDROW
private static final java.lang.String CSS_ODDROW
- See Also:
- Constant Field Values
CSS_BLANK
private static final java.lang.String CSS_BLANK
- See Also:
- Constant Field Values
CSS_DATA
private static final java.lang.String CSS_DATA
- See Also:
- Constant Field Values
CSS_DATA_HIGHLIGHT
private static final java.lang.String CSS_DATA_HIGHLIGHT
- See Also:
- Constant Field Values
CSS_DATA_FIRST
private static final java.lang.String CSS_DATA_FIRST
- See Also:
- Constant Field Values
CSS_DATA_HIGHLIGHT_FIRST
private static final java.lang.String CSS_DATA_HIGHLIGHT_FIRST
- See Also:
- Constant Field Values
CSS_HEADER
private static final java.lang.String CSS_HEADER
- See Also:
- Constant Field Values
CSS_HEADER_FIRST
private static final java.lang.String CSS_HEADER_FIRST
- See Also:
- Constant Field Values
CSS_CLS_NOLEFT
private static final java.lang.String CSS_CLS_NOLEFT
- See Also:
- Constant Field Values
CSS
private static final java.lang.String CSS
- See Also:
- Constant Field Values
NESTED_ITEMS_PARENT_DIRNAME
private static final java.lang.String NESTED_ITEMS_PARENT_DIRNAME
- See Also:
- Constant Field Values
NESTED_ITEMS_PARENT_DIR
private static final java.io.File NESTED_ITEMS_PARENT_DIR
NESTING
private static final int[][] NESTING
FILE_EXTENSION
private static final java.lang.String FILE_EXTENSION
- See Also:
- Constant Field Values
IO_BUF_SIZE
private static final int IO_BUF_SIZE
- See Also:
- Constant Field Values
ATTRIBUTE_SETS
private static final long[] ATTRIBUTE_SETS
ReportGenerator
public ReportGenerator()
getType
public final java.lang.String getType()
- Specified by:
getType
in interface IReportGenerator
process
public void process(IMetaData mdata,
ICoverageData cdata,
SourcePathCache cache,
IProperties properties)
throws EMMARuntimeException
- Specified by:
process
in interface IReportGenerator
- Throws:
EMMARuntimeException
cleanup
public void cleanup()
- Specified by:
cleanup
in interface IReportGenerator
- Overrides:
cleanup
in class AbstractReportGenerator
visit
public java.lang.Object visit(AllItem item,
java.lang.Object ctx)
- Specified by:
visit
in interface IItemVisitor
- Overrides:
visit
in class AbstractItemVisitor
visit
public java.lang.Object visit(PackageItem item,
java.lang.Object ctx)
- Specified by:
visit
in interface IItemVisitor
- Overrides:
visit
in class AbstractItemVisitor
visit
public java.lang.Object visit(SrcFileItem item,
java.lang.Object ctx)
- Specified by:
visit
in interface IItemVisitor
- Overrides:
visit
in class AbstractItemVisitor
visit
public java.lang.Object visit(ClassItem item,
java.lang.Object ctx)
- Specified by:
visit
in interface IItemVisitor
- Overrides:
visit
in class AbstractItemVisitor
createPage
private HTMLDocument createPage(java.lang.String title)
addPageHeader
private IElement addPageHeader(HTMLDocument page,
IItem item,
IItem[] path)
addPageFooter
private IElement addPageFooter(HTMLDocument page,
IItem item,
IItem[] path)
addHeaderRow
private int[] addHeaderRow(IItem item,
HTMLTable table,
int[] columns)
addItemRow
private void addItemRow(IItem item,
boolean odd,
HTMLTable table,
int[] columns,
java.lang.String nameHREF,
boolean anchor)
addClassRow
private void addClassRow(ClassItem item,
int clsIndex,
HTMLTable table,
int[] columns,
java.lang.String itemHREF,
boolean isAnchor)
addClassItemRow
private void addClassItemRow(IItem item,
boolean odd,
HTMLTable table,
int[] columns,
java.lang.String nameHREF,
boolean anchor)
srcFileAvailable
private boolean srcFileAvailable(SrcFileItem item,
SourcePathCache cache)
embedSrcFile
private void embedSrcFile(SrcFileItem item,
HTMLDocument page,
IntObjectMap anchorMap,
SourcePathCache cache)
addLineAnchorID
private static java.lang.String addLineAnchorID(int line,
java.lang.String anchorID,
IntObjectMap lineAnchorIDMap)
getParentPath
private IItem[] getParentPath(IItem item)
getItemHREF
private java.lang.String getItemHREF(IItem base,
IItem item)
getPageTitle
private IContent getPageTitle()
getFooterBottom
private IContent getFooterBottom()
addPageHeaderTitleRow
private void addPageHeaderTitleRow(HTMLTable header)
trimForDisplay
private static void trimForDisplay(java.lang.StringBuffer buf)
getItemFile
private static java.io.File getItemFile(java.io.File parentDir,
java.lang.String itemKey)
getItemKey
private static java.lang.String getItemKey(IItem item)
openOutFile
private static HTMLWriter openOutFile(java.io.File file,
java.lang.String encoding,
boolean mkdirs)
dataCellStyle
private static java.lang.String dataCellStyle(int column,
boolean highlight)
headerCellStyle
private static java.lang.String headerCellStyle(int column)