Class AbstractXmlEventParser
java.lang.Object
org.eluder.coveralls.maven.plugin.parser.AbstractXmlEventParser
- All Implemented Interfaces:
CoverageParser
- Direct Known Subclasses:
CloverParser,CoberturaParser,JaCoCoParser
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractXmlEventParser(File coverageFile, SourceLoader sourceLoader) -
Method Summary
Modifier and TypeMethodDescriptionprotected XMLStreamReadercreateEventReader(Reader reader) final FileGets the coverage file.protected final booleanisEndElement(XMLStreamReader xml, String name) protected final booleanisStartElement(XMLStreamReader xml, String name) protected final SourceloadSource(String sourceFile) protected abstract voidonEvent(XMLStreamReader xml, SourceCallback callback) final voidparse(SourceCallback callback) Parses a coverage report.
-
Constructor Details
-
AbstractXmlEventParser
-
-
Method Details
-
parse
Description copied from interface:CoverageParserParses a coverage report. Parsed source files are passed to the callback handler. This method should be called only once per instance.- Specified by:
parsein interfaceCoverageParser- Parameters:
callback- the source callback handler- Throws:
ProcessingException- if processing of the coverage report failsIOException- if an I/O error occurs
-
getCoverageFile
Description copied from interface:CoverageParserGets the coverage file.- Specified by:
getCoverageFilein interfaceCoverageParser- Returns:
- the coverage report file under processing
-
createEventReader
- Throws:
ProcessingException
-
onEvent
protected abstract void onEvent(XMLStreamReader xml, SourceCallback callback) throws XMLStreamException, ProcessingException, IOException -
loadSource
- Throws:
IOException
-
isStartElement
-
isEndElement
-