Package edu.hm.hafner.analysis.registry
Class ParserDescriptor
- java.lang.Object
-
- edu.hm.hafner.analysis.registry.ParserDescriptor
-
- Direct Known Subclasses:
DryDescriptor,FindBugsDescriptor,OwaspDependencyCheckDescriptor
public abstract class ParserDescriptor extends Object
Interface to describe all descriptors.- Author:
- Lorenz Munsch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParserDescriptor.OptionA parser configuration option.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract IssueParsercreateParser(ParserDescriptor.Option... options)Creates a newIssueParserinstance.StringgetDescription(Issue issue)Returns a detailed description of the specified issue.StringgetHelp()Returns an optional help text that can provide useful hints on how to configure the static analysis tool so that the report files could be parsed by Jenkins.StringgetIconUrl()Returns an optional URL to the icon or logo of the static analysis tool.StringgetId()Returns the technical ID of the parser.StringgetName()Returns a human-readable name of the parser.StringgetPattern()Returns the default filename pattern for this tool.StringgetUrl()Returns an optional URL to the homepage of the static analysis tool.booleanhasHelp()Returns whether an optional help text is available for this parser.booleanhasUrl()Returns whether the URL for the parser is set.
-
-
-
Method Detail
-
getId
public String getId()
Returns the technical ID of the parser.- Returns:
- the technical id of the parser
-
getName
public String getName()
Returns a human-readable name of the parser. Note that this property is not yet localizable.- Returns:
- the human-readable name
-
createParser
public abstract IssueParser createParser(ParserDescriptor.Option... options)
Creates a newIssueParserinstance.- Parameters:
options- options to configure the parser - may customize the new parser instance (if supported by the selected tool)- Returns:
- the parser
-
getPattern
public String getPattern()
Returns the default filename pattern for this tool. Override if your parser typically works on a specific file. This pattern will be interpreted as an ANT pattern or glob, resp.- Returns:
- the default pattern
-
getHelp
public String getHelp()
Returns an optional help text that can provide useful hints on how to configure the static analysis tool so that the report files could be parsed by Jenkins. This help can be a plain text message or an HTML snippet.- Returns:
- the help
-
hasHelp
public final boolean hasHelp()
Returns whether an optional help text is available for this parser.- Returns:
trueif there is a help text available- See Also:
getHelp()
-
getUrl
public String getUrl()
Returns an optional URL to the homepage of the static analysis tool.- Returns:
- the help
-
hasUrl
public final boolean hasUrl()
Returns whether the URL for the parser is set.- Returns:
trueif there is a URL available- See Also:
getUrl()
-
getIconUrl
public String getIconUrl()
Returns an optional URL to the icon or logo of the static analysis tool.- Returns:
- the help
-
-