Class CoverageParser
java.lang.Object
com.parasoft.findings.jenkins.coverage.model.CoverageParser
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CoberturaParser
,JacocoParser
Parses a file and returns the code coverage information in a tree of
Node
instances.- Author:
- Ullrich Hafner
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static edu.hm.hafner.util.SecureXmlParserFactory.ParsingException
protected static int
getIntegerValueOf
(StartElement element, QName attributeName) getOptionalValueOf
(StartElement element, QName attribute) final edu.hm.hafner.util.TreeStringBuilder
protected static String
getValueOf
(StartElement element, QName attribute) Parses a report provided by the given reader.protected static int
parseInteger
(String value) protected abstract ModuleNode
parseReport
(Reader reader, edu.hm.hafner.util.FilteredLog log) Parses a report provided by the given reader.protected Object
Called after de-serialization to restore transient fields.
-
Constructor Details
-
CoverageParser
public CoverageParser()
-
-
Method Details
-
parse
Parses a report provided by the given reader.- Parameters:
reader
- the reader with the coverage informationlog
- the logger to write messages to- Returns:
- the root of the created tree
- Throws:
edu.hm.hafner.util.SecureXmlParserFactory.ParsingException
- if the XML content cannot be read
-
readResolve
Called after de-serialization to restore transient fields.- Returns:
- this
-
getTreeStringBuilder
public final edu.hm.hafner.util.TreeStringBuilder getTreeStringBuilder() -
parseReport
Parses a report provided by the given reader.- Parameters:
reader
- the reader with the coverage informationlog
- the logger to write messages to- Returns:
- the root of the created tree
- Throws:
edu.hm.hafner.util.SecureXmlParserFactory.ParsingException
- if the XML content cannot be read
-
getOptionalValueOf
-
getIntegerValueOf
-
getValueOf
-
parseInteger
-
createEofException
protected static edu.hm.hafner.util.SecureXmlParserFactory.ParsingException createEofException()
-