Interface ICCResult
- All Superinterfaces:
ICCBase,ICCCompareSource,ICCConstants,ICCCoverageDataBasic,ICCPercentItem,ICCStatementDataBasic,ICCTreeItem
- All Known Subinterfaces:
ICCImportResult
- All Known Implementing Classes:
CCEmptyResult
public interface ICCResult
extends ICCTreeItem, ICCConstants, ICCCoverageDataBasic, ICCStatementDataBasic, ICCCompareSource
Represents one or more CC results.
When > 1 are included the results are merged, therefore retrieved results represent merged values.
- Since:
- 3.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCCompareSource
ICCCompareSource.MARKERTYPENested classes/interfaces inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCConstants
ICCConstants.COVERAGE_LEVEL, ICCConstants.COVERAGE_VIEW -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteFilter out modules and parts that have zero executable lines There are no extra arguments required.Fields inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCConstants
DATE_FORMAT, LANG_A, LANG_ALP_ASM, LANG_B, LANG_C, LANG_CL_400, LANG_COBOL, LANG_COBOL_COPYBOOK, LANG_CPP, LANG_FORTRAN, LANG_GCJ, LANG_JAVA, LANG_JAVASCRIPT, LANG_OPM_RPG, LANG_PLI, LANG_PLX, LANG_PLX86, LANG_RPG, LANG_SYSTEM, LANG_UNKNOWN, LANG_UPC, LANG_X10, LANGUAGE_DISPLAY_NAMES, RESULT_ERROR, RESULT_OK, RESULT_WARNINGFields inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCCoverageDataBasic
EMPTYTESTCASES -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a filter.voidClears any filters that have been added to the result.getFile(int id) Returns the ICCFile with the matching ID or null.Given a file name return an already added file.ICCFile[]getFiles()Returns an array of files in the merged results.getInfo()Returns more detailed information about this result.Get an item by unique IDgetLevel()Return the coverage level.Return aICCModulethat matches the name.Returns an array ofICCModule.intReturns the number of files in the merged results.Returns aICCPartthat matches the name.ICCPart[]getParts()Returns an array ofICCPart.intgetPercentCoverage(ICCTestcase testcase) Retrieves the coverage of a testcase.byteReturns a status value that represents an overall status.getTestcase(int id) Get testcase by ID.getTestcase(String testName) Returns the testcase with the passed name.Returns an array of testcases referenced in the merged results.getTestcases(String fileName) Given a file name return the testcases that hit at least one executable line.getTestcases(String[] fileNames) Given 1 or more file names return a set of testcases (no duplicates) that hit at least 1 executable line.Returns the directory to use when unzippingICCFilecontents.booleanReturn a simple boolean indicating if the results are valid.booleanisMerged()If this result was created from 2 or more input results then it is considered "merged".removeTestcase(int id) Remove a testcase from this result.voidAssigns a name to this result.voidsetUnZipOptions(String unZipDir) When an unzip directory is set the API will use the directory to unzip and return a File whenICCFile.getFile()is called.Methods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCBase
addEncodedMessage, addMessage, addMessage, getDecodedMessages, getDecodedMessages, getID, getMessages, getName, getProperties, getProperty, getProperty, isMessage, isProperty, setProperty, updatePropertyMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCCompareSource
getAnnotatedSource, setAnnotatedMarkerMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCCoverageDataBasic
getNumExecutableLines, getNumFlowPoints, getNumHitFlowPoints, getNumHitLines, isHitMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCPercentItem
getPercentCoverageMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCStatementDataBasic
getNumExecutableStatements, getNumHitStatements, hasStatementsMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCTreeItem
addChild, addChildren, getChild, getChildren, getNumChildren, getParent, getQualifiedName, getUniqueID, getUUID, isRoot, refresh, setParent, setUUID, supportsUUID
-
Field Details
-
EXCLUDE_ZEROLINES
static final byte EXCLUDE_ZEROLINESFilter out modules and parts that have zero executable lines There are no extra arguments required.- Since:
- 9.0
- See Also:
-
-
Method Details
-
getInfo
ICCResultInfo getInfo()Returns more detailed information about this result.- Returns:
- information
ICCResultInfoabout the result or results included
-
getNumFiles
int getNumFiles()Returns the number of files in the merged results.- Returns:
- number of files or zero
-
getFiles
ICCFile[] getFiles()Returns an array of files in the merged results. New in v9, the list will be sorted by file name. New in v10, the list is affected byaddFilter(byte, String...)withEXCLUDE_ZEROLINESIfEXCLUDE_ZEROLINESfilter is active then the returned list will NOT contain files with zero executable lines- Returns:
- array of
ICCFileor empty array
-
getFile
Given a file name return an already added file.- Parameters:
name- file name- Returns:
ICCFileor null- Since:
- 9.0
-
getFile
Returns the ICCFile with the matching ID or null.- Parameters:
id- unique id of the file- Returns:
ICCFileor null- Since:
- 9.0
-
getTestcases
ICCTestcase[] getTestcases()Returns an array of testcases referenced in the merged results. The testcases may or may not have caused lines to be hit.- Specified by:
getTestcasesin interfaceICCCoverageDataBasic- Returns:
- array of
ICCTestcaseor empty array
-
getTestcases
Given a file name return the testcases that hit at least one executable line.- Parameters:
fileName- retrieve testcases for this file name- Returns:
- array of
ICCTestcaseor empty array
-
getTestcases
Given 1 or more file names return a set of testcases (no duplicates) that hit at least 1 executable line. This is a union of all testcases that affect at least 1 of the passed files.- Parameters:
fileNames- array of fileNames- Returns:
- array of
ICCTestcaseor empty array
-
getTestcase
Get testcase by ID. Testcases are assigned a unique ID, this method returns a testcase given an ID.- Parameters:
id- testcase id- Returns:
- testcase or null if not found
-
getTestcase
Returns the testcase with the passed name. If there is > 1 testcase with the same name only the first instance will be returned.- Parameters:
testName- name of the testcase- Returns:
- testcase or null if not found
- Since:
- 9.0
-
removeTestcase
Remove a testcase from this result.- Parameters:
id- - testcase id- Returns:
- removed testcase
-
getStatus
byte getStatus()Returns a status value that represents an overall status. When merging results a single result can set this status to something other than OK. SeeICCConstants.- Returns:
ICCConstants
-
setName
Assigns a name to this result. -
getLevel
ICCConstants.COVERAGE_LEVEL getLevel()Return the coverage level. If this is a merged result then the coverage level of the first result is returned. to get the coverage level of an individual result useICCTestcase.getLevel().- Returns:
ICCConstants.COVERAGE_LEVEL
-
getPercentCoverage
Retrieves the coverage of a testcase.- Parameters:
testcase- the testcase to compute coverage.- Returns:
- the percent coverage for the testcase
- Since:
- 3.1
-
isMerged
boolean isMerged()If this result was created from 2 or more input results then it is considered "merged".- Returns:
- true if this result is considered merged
-
isComplete
boolean isComplete()Return a simple boolean indicating if the results are valid. During import if an error occurs that could affect the validity of the merged result then aCCResultExceptionwill be thrown and it will contain this result and any exceptions encountered during the import. Use theICCResultInfoto obtain a list of successful and unsuccessful import inputs.- Returns:
- true if all results were imported successfully, false if 1 or more results encountered errors that could affect the validity of the merged result
- Since:
- 4.0
-
getModules
ICCModule[] getModules()Returns an array ofICCModule. New in v9, only modules that have executable lines will be returned. If all modules/parts are needed then use theEXCLUDE_ZEROLINESfilter.- Returns:
- array of modules or an empty array
- Since:
- 4.0
-
getModule
Return aICCModulethat matches the name. New in v9 the returned value is affected by theEXCLUDE_ZEROLINESfilter.- Parameters:
name- module name- Returns:
- matching module or null
- Since:
- 6.0
-
setUnZipOptions
When an unzip directory is set the API will use the directory to unzip and return a File whenICCFile.getFile()is called.- Parameters:
unZipDir- path to a working directory that will be used to unzip files- Since:
- 4.0
-
getUnZipDir
String getUnZipDir()Returns the directory to use when unzippingICCFilecontents.- Returns:
- directory used to unzip
- Since:
- 4.0
-
getParts
ICCPart[] getParts()Returns an array ofICCPart. This will traverse all modules and return a complete list of unique parts. New in v9 the list will be sorted by the part name. New in v9 the list is affected by theEXCLUDE_ZEROLINESfilter.- Returns:
- array of parts or an empty array
- Since:
- 6.0
-
getPart
Returns aICCPartthat matches the name. Returns the first part that matches the name. New in v9 the returned value is affected by theEXCLUDE_ZEROLINESfilter.- Parameters:
name- of the part- Returns:
- null or the matching part
- Since:
- 6.0
-
addFilter
Adds a filter. The filter type will document if the order it is added can affect the results. To clear filters useclearFilters()Current list of filters:EXCLUDE_ZEROLINESThis will include all modules and parts that have zero executable lines. There are no additional parameters. New in v10, this filter also works on files with zero executable lines Filters act on the content of the result. This means that clearing the filters will return the results returned back to the default. Filters do not remove what is stored internally.- Parameters:
filter- filter typeargs- arguments as determined by the filter type- Since:
- 9.0
-
clearFilters
void clearFilters()Clears any filters that have been added to the result.- Since:
- 9.0
-
getItem
Get an item by unique ID- Parameters:
uuid- UUID unique to the artifact- Returns:
- item or null
- Since:
- 10.0
-