hudson.plugins.warnings.parser
Class P4Parser

java.lang.Object
  extended by hudson.plugins.warnings.parser.RegexpParser
      extended by hudson.plugins.warnings.parser.RegexpLineParser
          extended by hudson.plugins.warnings.parser.P4Parser
All Implemented Interfaces:
WarningsParser

public class P4Parser
extends RegexpLineParser

A parser for Perforce execution.

Author:
Adrián Deccico

Field Summary
 
Fields inherited from class hudson.plugins.warnings.parser.RegexpParser
DEPRECATION, FALSE_POSITIVE, PROPRIETARY_API
 
Constructor Summary
P4Parser()
          Creates a new instance of P4Parser.
 
Method Summary
protected  Warning createWarning(java.util.regex.Matcher matcher)
          Creates a new annotation for the specified pattern.
protected  boolean isLineInteresting(java.lang.String line)
          Returns whether the specified line is interesting.
 
Methods inherited from class hudson.plugins.warnings.parser.RegexpLineParser
parse
 
Methods inherited from class hudson.plugins.warnings.parser.RegexpParser
classifyIfEmpty, classifyWarning, findAnnotations, getLineNumber, getName, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

P4Parser

public P4Parser()
Creates a new instance of P4Parser.

Method Detail

createWarning

protected Warning createWarning(java.util.regex.Matcher matcher)
Creates a new annotation for the specified pattern.

Specified by:
createWarning in class RegexpParser
Parameters:
matcher - the regular expression matcher
Returns:
a new annotation for the specified pattern

isLineInteresting

protected boolean isLineInteresting(java.lang.String line)
Returns whether the specified line is interesting. Each interesting line will be handled by the defined regular expression. Here a parser can implement some fast checks (i.e. string or character comparisons) in order to see if a required condition is met.

Overrides:
isLineInteresting in class RegexpLineParser
Parameters:
line - the line to inspect
Returns:
true if the line should be handed over to the regular expression scanner, false if the line does not contain a warning.


Copyright © 2004-2011. All Rights Reserved.