public abstract class IssueParser extends Object implements Serializable
| Constructor and Description |
|---|
IssueParser() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(Path file,
Charset charset)
Returns whether this parser accepts the specified file as valid input.
|
protected boolean |
isXmlFile(Path file)
Returns whether the specified file is an XML file.
|
Report |
parse(Path file,
Charset charset)
Parses the specified file for issues.
|
abstract Report |
parse(Path file,
Charset charset,
Function<String,String> preProcessor)
Parses the specified file for issues.
|
public abstract Report parse(Path file, Charset charset, Function<String,String> preProcessor) throws ParsingException, ParsingCanceledException
file - the file to parsecharset - the encoding to use when reading filespreProcessor - pre processes each input line before handing it to the actual parserParsingException - Signals that during parsing a non recoverable error has been occurredParsingCanceledException - Signals that the parsing has been aborted by the userpublic boolean accepts(Path file, Charset charset)
file - the file to parsecharset - the encoding to use when reading filestrue if this parser accepts this file as valid input, or false if the file could not be
parsed by this parserpublic Report parse(Path file, Charset charset) throws ParsingException, ParsingCanceledException
file - the file to parsecharset - the encoding to use when reading filesParsingException - Signals that during parsing a non recoverable error has been occurredParsingCanceledException - Signals that the parsing has been aborted by the userprotected boolean isXmlFile(Path file)
file - the file to checktrue if the file is an XML file, false otherwiseCopyright © 2018. All rights reserved.