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 warnings parser that uses a Groovy script to parse the warnings log.
- Author:
- Ullrich Hafner
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionedu.hm.hafner.analysis.IssueParser
Returns a new parser instance.boolean
Returns the example to verify the parser.getId()
getName()
Returns the name.Returns the regular expression.Returns the Groovy script.int
hashCode()
final boolean
Returns whether the parser can scan messages spanning multiple lines.boolean
isValid()
Validates this instance.Methods inherited from class hudson.model.AbstractDescribableImpl
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:
true
if this instance is valid,false
otherwise
-
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:
true
if 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
-