|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.warnings.parser.RegexpParser
public abstract class RegexpParser
Parses an input stream for compiler warnings using the provided regular expression.
| Field Summary | |
|---|---|
protected static java.lang.String |
DEPRECATION
Warning classification. |
protected static java.lang.String |
PROPRIETARY_API
Warning classification. |
| Constructor Summary | |
|---|---|
RegexpParser(java.lang.String warningPattern)
Creates a new instance of RegexpParser. |
|
RegexpParser(java.lang.String warningPattern,
boolean useMultiLine)
Creates a new instance of RegexpParser. |
|
| Method Summary | |
|---|---|
protected java.lang.String |
classifyIfEmpty(java.lang.String group,
java.lang.String message)
Returns a category for the current warning. |
protected java.lang.String |
classifyWarning(java.lang.String message)
Classifies the warning message: tries to guess a category from the warning message. |
protected abstract Warning |
createWarning(java.util.regex.Matcher matcher)
Creates a new annotation for the specified pattern. |
protected int |
getLineNumber(java.lang.String lineNumber)
Converts a string line number to an integer value. |
java.util.Collection<FileAnnotation> |
parse(java.io.InputStream file)
Parses the specified input stream for compiler warnings using the provided regular expression. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String DEPRECATION
protected static final java.lang.String PROPRIETARY_API
| Constructor Detail |
|---|
public RegexpParser(java.lang.String warningPattern)
RegexpParser. Uses a single line matcher.
warningPattern - pattern of compiler warnings.
public RegexpParser(java.lang.String warningPattern,
boolean useMultiLine)
RegexpParser.
warningPattern - pattern of compiler warnings.useMultiLine - Enables multi line mode. In multi line mode the expressions
^ and $ match just after or just before,
respectively, a line terminator or the end of the input
sequence. By default these expressions only match at the
beginning and the end of the entire input sequence.| Method Detail |
|---|
public java.util.Collection<FileAnnotation> parse(java.io.InputStream file)
throws java.io.IOException
parse in interface WarningsParserfile - the file to parse
java.io.IOException - Signals that an I/O exception has occurred.protected abstract Warning createWarning(java.util.regex.Matcher matcher)
matcher - the regular expression matcher
protected final int getLineNumber(java.lang.String lineNumber)
lineNumber - the line number (as a string)
protected java.lang.String classifyWarning(java.lang.String message)
message - the message to check
protected java.lang.String classifyIfEmpty(java.lang.String group,
java.lang.String message)
group - the warning category (might be empty)message - the warning message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||