Class GroovyParser

java.lang.Object
hudson.model.AbstractDescribableImpl<GroovyParser>
io.jenkins.plugins.analysis.warnings.groovy.GroovyParser
All Implemented Interfaces:
Describable<GroovyParser>, Serializable

public class GroovyParser extends AbstractDescribableImpl<GroovyParser> implements Serializable
Defines the properties of a warnings parser that uses a Groovy script to parse the warnings log.
Author:
Ullrich Hafner
See Also:
  • Constructor Details

    • GroovyParser

      @DataBoundConstructor public GroovyParser(String id, String name, String regexp, String script, String example)
      Creates a new instance of GroovyParser.
      Parameters:
      id - the ID of the parser
      name - the name of the parser
      regexp - the regular expression
      script - the script to map the expression to a warning
      example - the example to verify the parser
  • Method Details

    • isValid

      public boolean isValid()
      Validates this instance.
      Returns:
      true if this instance is valid, false otherwise
    • getId

      public String getId()
    • getName

      public String getName()
      Returns the name.
      Returns:
      the name
    • getRegexp

      public String getRegexp()
      Returns the regular expression.
      Returns:
      the regular expression
    • getScript

      public String getScript()
      Returns the Groovy script.
      Returns:
      the Groovy script
    • getExample

      public String getExample()
      Returns the example to verify the parser.
      Returns:
      the example
    • hasMultiLineSupport

      public final boolean hasMultiLineSupport()
      Returns whether the parser can scan messages spanning multiple lines.
      Returns:
      true if the parser can scan messages spanning multiple lines
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • createParser

      public edu.hm.hafner.analysis.IssueParser createParser()
      Returns a new parser instance.
      Returns:
      a new parser instance
      Throws:
      IllegalArgumentException - if this parser configuration is not valid