Package edu.umd.cs.findbugs
Class BugPattern
- java.lang.Object
-
- edu.umd.cs.findbugs.BugPattern
-
- All Implemented Interfaces:
java.lang.Comparable<BugPattern>
public class BugPattern extends java.lang.Object implements java.lang.Comparable<BugPattern>
A BugPattern object collects all of the metadata for a particular species of BugInstance. Specifically, it stores the human-readable text for displaying a bug instance. BugPatterns derive from the BugPattern elements in the "findbugs.xml" and "messages.xml" found in a FindBugs plugin.- Author:
- David Hovemeyer
- See Also:
BugInstance
-
-
Constructor Summary
Constructors Constructor Description BugPattern(java.lang.String type, java.lang.String abbrev, java.lang.String category, boolean experimental, java.lang.String shortDescription, java.lang.String longDescription, java.lang.String detailText)Constructor.BugPattern(java.lang.String type, java.lang.String abbrev, java.lang.String category, boolean experimental, java.lang.String shortDescription, java.lang.String longDescription, java.lang.String detailText, int cweid)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadjustPriority(int change)intcompareTo(BugPattern other)booleanequals(java.lang.Object o)java.lang.StringgetAbbrev()Get the abbreviation or "bug code".java.lang.StringgetCategory()Get the category.java.lang.StringgetCategoryAbbrev()intgetCWEid()java.lang.StringgetDetailHTML()Get the detail text as a complete HTML document.java.lang.StringgetDetailPlainText()Get the Plain text describing the bug.java.lang.StringgetDetailText()Get the HTML detail text describing the bug.java.lang.StringgetLongDescription()Get the long description.intgetPriorityAdjustment()java.lang.StringgetShortDescription()Get the short description.java.lang.StringgetType()Get the type (species).inthashCode()booleanisDeprecated()booleanisExperimental()Is the bug pattern experimental?java.lang.StringtoString()
-
-
-
Constructor Detail
-
BugPattern
public BugPattern(java.lang.String type, java.lang.String abbrev, java.lang.String category, boolean experimental, java.lang.String shortDescription, java.lang.String longDescription, java.lang.String detailText)Constructor.- Parameters:
type- the type (species) of BugInstanceabbrev- the abbreviation or "bug code"; seeBugCodecategory- the categoryexperimental- true if the bug pattern is experimentalshortDescription- short one-line description of the bug specieslongDescription- longer one-line description; may contain placeholders for use byFindBugsMessageFormatto format BugAnnotationsdetailText- HTML text containing a full description of the bug species
-
BugPattern
public BugPattern(java.lang.String type, java.lang.String abbrev, java.lang.String category, boolean experimental, java.lang.String shortDescription, java.lang.String longDescription, java.lang.String detailText, int cweid)Constructor.- Parameters:
type- the type (species) of BugInstanceabbrev- the abbreviation or "bug code"; seeBugCodecategory- the categoryexperimental- true if the bug pattern is experimentalshortDescription- short one-line description of the bug specieslongDescription- longer one-line description; may contain placeholders for use byFindBugsMessageFormatto format BugAnnotationsdetailText- HTML text containing a full description of the bug species
-
-
Method Detail
-
getType
public java.lang.String getType()
Get the type (species).
-
getAbbrev
public java.lang.String getAbbrev()
Get the abbreviation or "bug code".
-
getCategory
public java.lang.String getCategory()
Get the category.
-
getPriorityAdjustment
public int getPriorityAdjustment()
-
adjustPriority
public void adjustPriority(int change)
-
getCategoryAbbrev
public java.lang.String getCategoryAbbrev()
-
isExperimental
public boolean isExperimental()
Is the bug pattern experimental?
-
getShortDescription
public java.lang.String getShortDescription()
Get the short description.
-
getLongDescription
public java.lang.String getLongDescription()
Get the long description.
-
getDetailText
public java.lang.String getDetailText()
Get the HTML detail text describing the bug.
-
getDetailPlainText
public java.lang.String getDetailPlainText()
Get the Plain text describing the bug.
-
getDetailHTML
public java.lang.String getDetailHTML()
Get the detail text as a complete HTML document.
-
compareTo
public int compareTo(BugPattern other)
- Specified by:
compareToin interfacejava.lang.Comparable<BugPattern>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
getCWEid
public int getCWEid()
- Returns:
- Returns the cweid.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isDeprecated
public boolean isDeprecated()
- Returns:
- true if this bug pattern is not used anymore and exists for backward compatibility only
-
-