Class GroovyParser
java.lang.Object
hudson.model.AbstractDescribableImpl<GroovyParser>
io.jenkins.plugins.analysis.warnings.groovy.GroovyParser
- All Implemented Interfaces:
Describable<GroovyParser>,Serializable
Defines the properties of a warning parser that uses a Groovy script to parse the console log.
- Author:
- Ullrich Hafner
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionedu.hm.hafner.analysis.IssueParserReturns a new parser instance.booleanReturns the example to verify the parser.getId()getName()Returns the name.Returns the regular expression.Returns the Groovy script.inthashCode()final booleanReturns whether the parser can scan messages spanning multiple lines.booleanisValid()Validates this instance.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Describable
getDescriptor
-
Constructor Details
-
GroovyParser
@DataBoundConstructor public GroovyParser(String id, String name, String regexp, String script, String example) Creates a new instance ofGroovyParser.- Parameters:
id- the ID of the parsername- the name of the parserregexp- the regular expressionscript- the script to map the expression to a warningexample- the example to verify the parser
-
-
Method Details
-
isValid
public boolean isValid()Validates this instance.- Returns:
trueif this instance is valid,falseotherwise
-
getId
-
getName
Returns the name.- Returns:
- the name
-
getRegexp
Returns the regular expression.- Returns:
- the regular expression
-
getScript
Returns the Groovy script.- Returns:
- the Groovy script
-
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:
trueif the parser can scan messages spanning multiple lines
-
equals
-
hashCode
public int hashCode() -
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
-