hudson.plugins.findbugs.parser
Class Bug

java.lang.Object
  extended by hudson.plugins.analysis.util.model.AbstractAnnotation
      extended by hudson.plugins.findbugs.parser.Bug
All Implemented Interfaces:
hudson.plugins.analysis.util.model.FileAnnotation, Serializable, Comparable<hudson.plugins.analysis.util.model.FileAnnotation>

public class Bug
extends hudson.plugins.analysis.util.model.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

Field Summary
static String ORIGIN
          Origin of the annotation.
 
Fields inherited from class hudson.plugins.analysis.util.model.AbstractAnnotation
WORKSPACE_FILES
 
Constructor Summary
Bug(hudson.plugins.analysis.util.model.Priority priority, String message, String category, String type)
          Creates a new instance of Bug that has no associated line in code (file warning).
Bug(hudson.plugins.analysis.util.model.Priority priority, String message, String category, String type, int lineNumber)
          Creates a new instance of Bug.
Bug(hudson.plugins.analysis.util.model.Priority priority, String message, String category, String type, int start, int end)
          Creates a new instance of Bug.
Bug(hudson.plugins.analysis.util.model.Priority priority, String message, String category, String type, int start, int end, String tooltip)
          Creates a new instance of Bug.
 
Method Summary
 boolean equals(Object obj)
           
 int getAgeInDays()
           
 long getFirstSeen()
           
 String getMessage()
           
 int getRank()
          Returns the rank of this bug.
 int getReviewCount()
           
 String getToolTip()
          
 int hashCode()
           
 boolean isInCloud()
           
 boolean isNotAProblem()
           
 boolean isShouldBeInCloud()
           
 void setDetailsUrlTemplate(String detailsUrl)
           
 void setInCloud(boolean inCloud)
           
 void setInstanceHash(String instanceHash)
          Sets the unique hash code of this bug.
 void setRank(int bugRank)
          Sets the rank of this bug.
 void setShouldBeInCloud(boolean shouldBeInCloud)
           
 
Methods inherited from class hudson.plugins.analysis.util.model.AbstractAnnotation
addLineRange, canDisplayFile, compareTo, getCategory, getContextHashCode, getFileName, getKey, getLineRanges, getLinkLineNumber, getLinkName, getModuleName, getOrigin, getPackageName, getPathName, getPrimaryLineNumber, getPriority, getShortFileName, getTempName, getType, hasPackageName, setColumnPosition, setContextHashCode, setFileName, setModuleName, setOrigin, setPackageName, setPathName, setPriority, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ORIGIN

public static final String ORIGIN
Origin of the annotation.

See Also:
Constant Field Values
Constructor Detail

Bug

public Bug(hudson.plugins.analysis.util.model.Priority priority,
           String message,
           String category,
           String type,
           int start,
           int end)
Creates a new instance of Bug.

Parameters:
priority - the priority
message - the message of the warning
category - the warning category
type - the identifier of the warning type
start - the first line of the line range
end - the last line of the line range

Bug

public Bug(hudson.plugins.analysis.util.model.Priority priority,
           String message,
           String category,
           String type,
           int lineNumber)
Creates a new instance of Bug.

Parameters:
priority - the priority
message - the message of the warning
category - the warning category
type - the identifier of the warning type
lineNumber - the line number of the warning in the corresponding file

Bug

public Bug(hudson.plugins.analysis.util.model.Priority priority,
           String message,
           String category,
           String type)
Creates a new instance of Bug that has no associated line in code (file warning).

Parameters:
priority - the priority
message - the message of the warning
category - the warning category
type - the identifier of the warning type

Bug

public Bug(hudson.plugins.analysis.util.model.Priority priority,
           String message,
           String category,
           String type,
           int start,
           int end,
           String tooltip)
Creates a new instance of Bug.

Parameters:
priority - the priority
message - the message of the warning
category - the warning category
type - the identifier of the warning type
start - the first line of the line range
end - the last line of the line range
tooltip - the tooltip to show
Method Detail

setRank

public void setRank(int bugRank)
Sets the rank of this bug.

Parameters:
bugRank - the rank of this bug

getRank

public int getRank()
Returns the rank of this bug.

Returns:
the rank

getFirstSeen

public long getFirstSeen()

setInCloud

public void setInCloud(boolean inCloud)

isInCloud

public boolean isInCloud()

getAgeInDays

public int getAgeInDays()

getReviewCount

public int getReviewCount()

isNotAProblem

public boolean isNotAProblem()

setShouldBeInCloud

public void setShouldBeInCloud(boolean shouldBeInCloud)

isShouldBeInCloud

public boolean isShouldBeInCloud()

setDetailsUrlTemplate

public void setDetailsUrlTemplate(@CheckForNull
                                  String detailsUrl)

getToolTip

public String getToolTip()


getMessage

public String getMessage()
Specified by:
getMessage in interface hudson.plugins.analysis.util.model.FileAnnotation
Overrides:
getMessage in class hudson.plugins.analysis.util.model.AbstractAnnotation

setInstanceHash

public void setInstanceHash(String instanceHash)
Sets the unique hash code of this bug.

Parameters:
instanceHash - the instance hash as generated by the FindBugs library

hashCode

public int hashCode()
Overrides:
hashCode in class hudson.plugins.analysis.util.model.AbstractAnnotation

equals

public boolean equals(Object obj)
Overrides:
equals in class hudson.plugins.analysis.util.model.AbstractAnnotation


Copyright © 2004-2012 Hudson. All Rights Reserved.