Interface ICCSource
- All Known Subinterfaces:
ICCFile,ICCFlowPoint,ICCImportFile,ICCImportFlowPoint
public interface ICCSource
Implementors of this interface declare that they support source in some form It may be source or listing depending on
the origin of the code coverage data
- Since:
- 4.1
- Do not implement:
- This interface is not intended to be implemented by clients.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetFile()getFile(boolean unzip) Returns a name for this itemintintgetLine()Return the logical first line number in the source/listinggetProperty(String key) Returns theICCResultthat contains this artifactgetStream(boolean includeMarkers) booleanReturns true if the source is NOT stored with the data, i.e.booleanvoidsetProperty(String key, Object value) voidsetSourceAvailable(boolean available) Sets source available to passed booleanvoidupdateFile(File file) Updates or overwrites the source file Used after an import that didn't find source to update with found source Calls toisSourceAvailable()will return true after a file is set Calls toisExternal()will return true indicating that the file exists outside the results
-
Field Details
-
SOURCE_OBJECT
- See Also:
-
-
Method Details
-
isSourceAvailable
boolean isSourceAvailable()- Returns:
- true if source is available
-
getFile
File getFile()- Returns:
- the file if it exists
-
getFile
- Parameters:
unzip- if true the file will be unzipped if it is in a zip file- Returns:
- the unzipped file
- Since:
- 5.0
-
getStream
- Returns:
- inputStream to the contents
- Throws:
IOException- exception if there is a problem getting the stream
-
getStream
- Parameters:
includeMarkers- if true then code coverage markers are inserted into each line- Returns:
- stream with contents and optionally inserted cc markers
- Throws:
IOException- if there is a problem getting the stream- Since:
- 10.0
-
getEncoding
String getEncoding()- Returns:
- file encoding
- Since:
- 7.0
-
getLine
int getLine()Return the logical first line number in the source/listing- Returns:
- line number in source for start of this artifact
-
getFileName
String getFileName()Returns a name for this item- Returns:
- file name
-
getLanguage
int getLanguage()- Returns:
- programming language
-
updateFile
Updates or overwrites the source file Used after an import that didn't find source to update with found source Calls toisSourceAvailable()will return true after a file is set Calls toisExternal()will return true indicating that the file exists outside the results- Parameters:
file- to use with this source- Since:
- 5.0
-
setSourceAvailable
void setSourceAvailable(boolean available) Sets source available to passed boolean- Parameters:
available- update source available
-
setProperty
- Parameters:
key- property keyvalue- property value
-
getProperty
- Parameters:
key- property key- Returns:
- property object or null
-
isExternal
boolean isExternal()Returns true if the source is NOT stored with the data, i.e. external to the data Returns false if the source is not availableisSourceAvailable()or the source is stored with the data- Returns:
- true if the source is stored external or separate from the data
- Since:
- 5.0
-
getResult
ICCResult getResult()Returns theICCResultthat contains this artifact- Returns:
- result that contains this artifact
- Since:
- 7.0
-