Interface ICCStatementData
- All Superinterfaces:
ICCPercentItem,ICCStatementDataBasic
- All Known Subinterfaces:
ICCFile,ICCFlowPoint,ICCImportFile,ICCImportFlowPoint,ICCImportStatementData
Implemented by artifacts that support statement level data
Statements are represented as
ICCStatement
If statement level information is NOT available then a line is
considered to have 1 statement- Since:
- 9.0
-
Method Summary
Modifier and TypeMethodDescriptiongetHitStatements(ICCTestcase testcase) Returns statements hit by the testcaseReturn the last statement for this artifact For artifacts that begin and end on the same statement this will return the same value asgetStatement()Return the first statement for this artifactgetStatement(int line, int index) Return a specific statement on a linegetStatements(boolean hit) Returns an array of statements, use the hit parameter to get a complete list or just those that were hit UseICCStatementDataBasic.hasStatements()to determine if they are available.getStatements(int line) Returns 1 or more statements that exist on this line If the line number does not exist then zero entries are returned If the line exists then at least 1 statement will be returnedgetTestcases(ICCStatement statement) Returns the testcase(s) that hit the statementbooleanisHit(ICCStatement statement) Returns true if the statement was hit Each statement can be asked if it was hit usingICCStatement.isHit()Methods 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, hasStatements
-
Method Details
-
getStatement
ICCStatement getStatement()Return the first statement for this artifact- Returns:
- first statement in the artifact
-
getLastStatement
ICCStatement getLastStatement()Return the last statement for this artifact For artifacts that begin and end on the same statement this will return the same value asgetStatement()- Returns:
- last statement in the artifact
-
getStatements
Returns an array of statements, use the hit parameter to get a complete list or just those that were hit UseICCStatementDataBasic.hasStatements()to determine if they are available. This may avoid loading statements that just match the lines NOTE: because a line can have multiple statements a line can be considered hit but some of the statements on a line may not have been hit- Parameters:
hit- if true then only hit statements are returned. If false then all statements are returned- Returns:
- If hit is true then returns zero or statements that were hit. If hit is false then all statements are returned.
-
getHitStatements
Returns statements hit by the testcase- Parameters:
testcase- return statements hit by this testcase- Returns:
- zero or more statements that were hit by the testcase
-
getTestcases
Returns the testcase(s) that hit the statement- Parameters:
statement- return testcases hit by this statement- Returns:
- testcases that hit statement
-
isHit
Returns true if the statement was hit Each statement can be asked if it was hit usingICCStatement.isHit()- Parameters:
statement- statement to check- Returns:
- true if statement was hit else false
-
getStatements
Returns 1 or more statements that exist on this line If the line number does not exist then zero entries are returned If the line exists then at least 1 statement will be returned- Parameters:
line- line to check- Returns:
- zero or more
ICCStatementthat are on the line
-
getStatement
Return a specific statement on a line- Parameters:
line- line numberindex- index of statement on line- Returns:
- statement that matches the line and index or null
-