hudson.plugins.warnings.parser
Class Warning

java.lang.Object
  extended by hudson.plugins.warnings.util.model.AbstractAnnotation
      extended by hudson.plugins.warnings.parser.Warning
All Implemented Interfaces:
FileAnnotation, java.io.Serializable

public class Warning
extends AbstractAnnotation

A serializable Java Bean class representing a warning.

Note: this class has a natural ordering that is inconsistent with equals.

Author:
Ulli Hafner
See Also:
Serialized Form

Constructor Summary
Warning(java.lang.String fileName, int start, java.lang.String type, java.lang.String category, java.lang.String message)
          Creates a new instance of Warning.
Warning(java.lang.String fileName, int start, java.lang.String type, java.lang.String category, java.lang.String message, Priority priority)
          Creates a new instance of Warning.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 java.lang.String getCategory()
          Returns the category of the warning.
 java.lang.String getShortFileName()
          Gets the associated file name of this bug (without path).
 java.lang.String getToolTip()
          Returns the a detailed description that will be used as tooltip.
 java.lang.String getType()
          Returns the warning type.
 int hashCode()
          
 
Methods inherited from class hudson.plugins.warnings.util.model.AbstractAnnotation
addLineRange, getFileName, getKey, getLineRanges, getMessage, getModuleName, getPackageName, getPrimaryLineNumber, getPriority, setFileName, setModuleName, setPackageName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Warning

public Warning(java.lang.String fileName,
               int start,
               java.lang.String type,
               java.lang.String category,
               java.lang.String message)
Creates a new instance of Warning.

Parameters:
fileName - the name of the file
start - the first line of the line range
type - the identifier of the warning type
category - the warning category
message - the message of the warning

Warning

public Warning(java.lang.String fileName,
               int start,
               java.lang.String type,
               java.lang.String category,
               java.lang.String message,
               Priority priority)
Creates a new instance of Warning.

Parameters:
fileName - the name of the file
start - the first line of the line range
type - the identifier of the warning type
category - the warning category
message - the message of the warning
priority - the priority of the warning
Method Detail

getShortFileName

public java.lang.String getShortFileName()
Gets the associated file name of this bug (without path).

Returns:
the short file name

getCategory

public java.lang.String getCategory()
Returns the category of the warning.

Returns:
the warning category

getType

public java.lang.String getType()
Returns the warning type.

Returns:
the warning type

getToolTip

public java.lang.String getToolTip()
Returns the a detailed description that will be used as tooltip.

Returns:
the tooltip of this annotation

hashCode

public int hashCode()

Overrides:
hashCode in class AbstractAnnotation

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class AbstractAnnotation


Copyright © 2008. All Rights Reserved.