Klasse IssueParser

java.lang.Object
edu.hm.hafner.analysis.IssueParser
Alle implementierten Schnittstellen:
Serializable
Bekannte direkte Unterklassen:
AbstractDryParser, AbstractViolationAdapter, AjcParser, CargoCheckParser, CcmParser, CheckStyleParser, ClangAnalyzerPlistParser, EclipseXMLParser, EmbeddedEngineerParser, FindBugsParser, FxCopParser, GendarmeParser, IdeaInspectionParser, JcReportParser, JsonIssueParser, JsonLogParser, JsonParser, LintParser, LookaheadParser, PmdParser, PolyspaceParser, PVSStudioParser, QtTranslationParser, RfLintParser, SimulinkCheckParser, StyleCopParser, TaglistParser, XmlParser

public abstract class IssueParser extends Object implements Serializable
Parses a file and returns the issues reported in this file.
Autor:
Ullrich Hafner
Siehe auch:
  • Felddetails

  • Konstruktordetails

    • IssueParser

      public IssueParser()
  • Methodendetails

    • parse

      public abstract Report parse(ReaderFactory readerFactory) throws ParsingException, ParsingCanceledException
      Parses the specified file for issues.
      Parameter:
      readerFactory - provides a reader to the reports
      Gibt zurück:
      the issues
      Löst aus:
      ParsingException - Signals that during parsing a non-recoverable error has been occurred
      ParsingCanceledException - Signals that the parsing has been aborted by the user
    • parseFile

      public Report parseFile(ReaderFactory readerFactory) throws ParsingException, ParsingCanceledException
      Parses the specified file for issues. Invokes the parser using parse(ReaderFactory) and sets the file name of the report.
      Parameter:
      readerFactory - provides a reader to the reports
      Gibt zurück:
      the issues
      Löst aus:
      ParsingException - Signals that during parsing a non-recoverable error has been occurred
      ParsingCanceledException - Signals that the parsing has been aborted by the user
    • accepts

      public boolean accepts(ReaderFactory readerFactory)
      Returns whether this parser accepts the specified file as valid input. Parsers may reject a file if it is in the wrong format to avoid exceptions during parsing.
      Parameter:
      readerFactory - provides a reader to the reports
      Gibt zurück:
      true if this parser accepts this file as valid input, or false if the file could not be parsed by this parser
    • isXmlFile

      protected boolean isXmlFile(ReaderFactory readerFactory)
      Returns whether the specified file is an XML file. This method just checks if the first 10 lines contain the XML tag rather than parsing the whole document.
      Parameter:
      readerFactory - the file to check
      Gibt zurück:
      true if the file is an XML file, false otherwise
    • equalsIgnoreCase

      public static boolean equalsIgnoreCase(@CheckForNull String a, @CheckForNull String b)

      Compares two CharSequences, returning true if they represent equal sequences of characters, ignoring case.

      nulls are handled without exceptions. Two null references are considered equal. The comparison is case insensitive.

       equalsIgnoreCase(null, null)   = true
       equalsIgnoreCase(null, "abc")  = false
       equalsIgnoreCase("abc", null)  = false
       equalsIgnoreCase("abc", "abc") = true
       equalsIgnoreCase("abc", "ABC") = true
       
      Parameter:
      a - the first CharSequence, may be null
      b - the second CharSequence, may be null
      Gibt zurück:
      true if the CharSequences are equal (case-insensitive), or both null